3

I have a react-native project its was OK.I run react-native link and now when I run react-native run-android I get Error:

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

now I run

./gradlew clean 

I have this info:

Configure project :react-native-contacts Subproject ':react-native-contacts' has location '/home/mohamadreza/CODES/react_native/chontact/node_modules/react-native-contacts/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

> 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

Configure project :react-native-screens Subproject ':react-native-screens' has location '/home/mohamadreza/CODES/react_native/chontact/node_modules/react-native-screens/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 Adding a Configuration as a dependency is a confusing behavior which isn't recommended. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. If you're interested in inheriting the dependencies from the Configuration you are adding, you should use Configuration#extendsFrom instead. See https://docs.gradle.org/7.2/dsl/org.gradle.api.artifacts.Configuration.html#org.gradle.api.artifacts.Configuration:extendsFrom(org.gradle.api.artifacts.Configuration[]) for more details.

Configure project :react-native-sms Subproject ':react-native-sms' has location '/home/mohamadreza/CODES/react_native/chontact/node_modules/react-native-sms/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 The RepositoryHandler.jcenter() method has been deprecated. This is scheduled to be removed in Gradle 8.0. JFrog announced JCenter's sunset in February 2021. Use mavenCentral() instead. Consult the upgrading guide for further information: https://docs.gradle.org/7.2/userguide/upgrading_version_6.html#jcenter_deprecation at build_7t1wntr6nbm4h0ypkr7bjtc8c$_run_closure1$_closure2.doCall(/home/mohamadreza/CODES/react_native/chontact/node_modules/react-native-sms/android/build.gradle:3) (Run with --stacktrace to get the full stack trace of this deprecation warning.)

Configure project :react-native-sqlite-storage Subproject ':react-native-sqlite-storage' has location '/home/mohamadreza/CODES/react_native/chontact/node_modules/react-native-sqlite-storage/platforms/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

Configure project :react-native-vector-icons Subproject ':react-native-vector-icons' has location '/home/mohamadreza/CODES/react_native/chontact/node_modules/react-native-vector-icons/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

anyone could help me? react native ===> 67

classpath('com.android.tools.build:gradle:7.1.2')

mohamadreza ch
  • 311
  • 4
  • 13

1 Answers1

0

What helped for me is changing the android Gradle version to 7.4, reference this github issue

njk
  • 115
  • 10