error while running run-android with React-Native

Asked

Viewed 3,403 times

0

Well, after managing to run the initial command and create the project(React-Native init ) and being with my android emulator running on the machine (Genymotion) but running run-android it accuses this error :


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_211 contains a valid JDK installation.

* 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 3m 16s
12 actionable tasks: 1 executed, 11 up-to-date
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.```

1 answer

1


The React Native configuration is full of nuances. For this reason, I recommend redoing the settings again using the React Native documentation itself. Follow the documentation link: https://facebook.github.io/react-native/docs/getting-started (Just don’t forget to select the React Native CLI Quickstart).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.