Hello everyone, how are you? I’m having a difficulty here and would like some help. Essentially, we have a React Native project for Android, and we’re trying to compile it, but it’s causing an error saying that the correct version of Gradle was not found.
We’re doing this to update React Native to be compatible with SDK 33 or higher.
The error is as follows:
BUILD FAILED in 18s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'Ludare'.
> Could not determine the dependencies of null.
> Could not resolve all task dependencies for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:7.3.3.
Searched in the following locations:
- https://jitpack.io/com/android/tools/build/gradle/7.3.3/gradle-7.3.3.pom
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.3.3/gradle-7.3.3.pom
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.3.3/gradle-7.3.3.pom
Required by:
project :
> Could not find com.android.tools.build:gradle:7.3.3.
Searched in the following locations:
- https://jitpack.io/com/android/tools/build/gradle/7.3.3/gradle-7.3.3.pom
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.3.3/gradle-7.3.3.pom
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.3.3/gradle-7.3.3.pom
Required by:
project : > project :react-native-gradle-plugin
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 18s
at makeError (C:\Users\seiji\Followmme-FrontEnd\node_modules\execa\index.js:174:9)
at C:\Users\seiji\Followmme-FrontEnd\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (C:\Users\seiji\Followmme-FrontEnd\node_modules\react-native\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\seiji\Followmme-FrontEnd\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Thank you very much for the help.