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

  • 遇到的问题:执行react-native run-android报错
    Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0._第1张图片
  • 解决方法
  1. 打开gradle-wrapper.properties文件,修改下列代码
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip

改成

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

然后终端运行

cd android && ./gradlew clean && cd ../

在执行

 react-native run-android

如未解决问题:
将build.grade文件中

classpath("com.android.tools.build:gradle:3.5.3")

改成

classpath("com.android.tools.build:gradle:3.5.4")

你可能感兴趣的:(android,react-native开发)