Deprecated Gradle features not compatible

后端 未结 1 1742
北海茫月
北海茫月 2020-12-17 05:45

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

Logs:

Deprecated Gradle features were used in this build, making it incompatible wi         


        
相关标签:
1条回答
  • 2020-12-17 06:25
    • 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
      
    0 讨论(0)
提交回复
热议问题