Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.4k views
Welcome To Ask or Share your Answers For Others

1 Answer

  • 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
    

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...