1

我有一个 react-native 项目,它没问题。我运行 react-native 链接,现在当我运行 react-native run-android 时出现错误:

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

现在我跑

./gradlew clean 

我有这个信息:

配置项目 :react-native-contacts 子项目 ':react-native-contacts' 的位置 '/home/mohamadreza/CODES/react_native/chontact/node_modules/react-native-contacts/android' 在项目根目录之外。此行为已被弃用,并计划在 Gradle 8.0 中删除。有关更多信息,请参阅升级指南:https ://docs.gradle.org/7.2/userguide/upgrading_version_7.html#deprecated_flat_project_structure

> Configure project :react-native-safe-area-context
Subproject ':react-native-safe-area-context' has location '/home/mohamadreza/CODES/react_native/chontact/node_modules/react-native-safe-area-context/android' which is outside of the project root. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. Consult the upgrading guide for further information: https://docs.gradle.org/7.2/userguide/upgrading_version_7.html#deprecated_flat_project_structure

配置项目 :react-native-screens 子项目 ':react-native-screens' 的位置 '/home/mohamadreza/CODES/react_native/chontact/node_modules/react-native-screens/android' 在项目根目录之外。此行为已被弃用,并计划在 Gradle 8.0 中删除。有关更多信息,请参阅升级指南:https ://docs.gradle.org/7.2/userguide/upgrading_version_7.html#deprecated_flat_project_structure 添加配置作为依赖项是一种令人困惑的行为,不建议这样做。此行为已被弃用,并计划在 Gradle 8.0 中删除。如果您有兴趣从要添加的配置继承依赖项,则应改用 Configuration#extendsFrom。看https://docs.gradle.org/7.2/dsl/org.gradle.api.artifacts.Configuration.html#org.gradle.api.artifacts.Configuration:extendsFrom(org.gradle.api.artifacts.Configuration[])更多细节。

配置项目 :react-native-sms 子项目 ':react-native-sms' 的位置 '/home/mohamadreza/CODES/react_native/chontact/node_modules/react-native-sms/android' 在项目根目录之外。此行为已被弃用,并计划在 Gradle 8.0 中删除。有关详细信息,请参阅升级指南:https ://docs.gradle.org/7.2/userguide/upgrading_version_7.html#deprecated_flat_project_structure RepositoryHandler.jcenter() 方法已被弃用。这计划在 Gradle 8.0 中删除。JFrog 于 2021 年 2 月宣布 JCenter 的日落。改用 mavenCentral()。有关更多信息,请参阅升级指南:https ://docs.gradle.org/7.2/userguide/upgrading_version_6.html#jcenter_deprecation 在 build_7t1wntr6nbm4h0ypkr7bjtc8c$_run_closure1$_closure2.doCall(/home/mohamadreza/CODES/react_native/chontact/node_modules/react-native-sms/android/build.gradle:3) (使用 --stacktrace 运行以获得完整的堆栈跟踪弃用警告。)

配置项目:react-native-sqlite-storage 子项目 ':react-native-sqlite-storage' 的位置为 '/home/mohamadreza/CODES/react_native/chontact/node_modules/react-native-sqlite-storage/platforms/android' 其中位于项目根目录之外。此行为已被弃用,并计划在 Gradle 8.0 中删除。有关更多信息,请参阅升级指南:https ://docs.gradle.org/7.2/userguide/upgrading_version_7.html#deprecated_flat_project_structure

配置项目 :react-native-vector-icons 子项目 ':react-native-vector-icons' 的位置 '/home/mohamadreza/CODES/react_native/chontact/node_modules/react-native-vector-icons/android' 在外面项目根目录。此行为已被弃用,并计划在 Gradle 8.0 中删除。有关更多信息,请参阅升级指南:https ://docs.gradle.org/7.2/userguide/upgrading_version_7.html#deprecated_flat_project_structure

任何人都可以帮助我吗?反应原生 ===> 67

类路径('com.android.tools.build:gradle:7.1.2')

4

0 回答 0