Deprecated Gradle features not compatible

不羁的心 提交于 2020-11-24 17:15:33

问题


I got this error when I run react-native run-android

Logs:

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.

Android Gradle Plugin Version - 3.6.3
Gradle Version- 6.0.1

回答1:


  • Update the following files:

gradle-wrapper.properties

 distributionUrl=https://services.gradle.org/distributions/gradle-6.0.1-all.zip

android/app/build.gradle

defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
multiDexEnabled true   //add this
}
  • Update all your third-party dependencies
  • If the error still exists, run the below command:

    cd android && ./gradlew clean && ./gradlew :app:bundleRelease
    
  • Try this if it still exists:

    npm install --save-dev jetifier
    npx jetify
    npx react-native run-android
    


来源:https://stackoverflow.com/questions/61863724/deprecated-gradle-features-not-compatible

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!