Hi guys !
I create my React native app using code npx react-native init projectname
and run my project with npx react-native start then npx react-native run-android, but after installing gradle and compiling it seems error
Preparing "Install Android SDK Build-Tools 30.0.2 (revision: 30.0.2)". "Install Android SDK Build-Tools 30.0.2 (revision: 30.0.2)" ready. Installing Android SDK Build-Tools 30.0.2 in /home/dude/Android/Sdk/build-tools/30.0.2 "Install Android SDK Build-Tools 30.0.2 (revision: 30.0.2)" complete. "Install Android SDK Build-Tools 30.0.2 (revision: 30.0.2)" finished.
Task :app:compileDebugJavaWithJavac FAILED 26 actionable tasks: 26 executed
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'.
Could not find tools.jar. Please check that /usr/lib/jvm/java-8-openjdk-amd64 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.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'.
Could not find tools.jar. Please check that /usr/lib/jvm/java-8-openjdk-amd64 contains a valid JDK installation.
What ive been tried Reinstall JDK. Install JDK 11. Find tool.jar manually which i couldnt find anywhere or i dont know how to find it. find answer in help.gradle.com and stackoverflow.
Thanks before Russ