Execution failed for task ':react-native-google-analytics-bridge:compileReleaseJavaWithJavac'. Could not find tools.jar
See original GitHub issueEnvironment
- Windows 10
- Android - Note 5 running 6.0.1
- Standard SDK 5.6.0, Premium SDK 2.6.0
Steps to reproduce
- First made sure to Gradle the app:
C:\ReactMobileProj\react-native-starter-app\android (master -> origin)
λ .\gradlew clean
:app:clean UP-TO-DATE
:react-native-google-analytics-bridge:clean
:react-native-vector-icons:clean UP-TO-DATE
BUILD SUCCESSFUL
Then Run:
λ react-native run-android
Expected result
Expect that it loads the app on my phone
Actual result
Instead I get this:
:react-native-google-analytics-bridge:processReleaseJavaRes UP-TO-DATE
:react-native-google-analytics-bridge:compileReleaseJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-google-analytics-bridge:compileReleaseJavaWithJavac'.
> Could not find tools.jar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 45.445 secs
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/android-setup.html
Have Tried Linking
C:\ReactMobileProj\react-native-starter-app (master -> origin)
λ react-native link react-native-google-analytics-bridge
Scanning 693 folders for symlinks in C:\ReactMobileProj\react-native-starter-app\node_modules (64ms)
rnpm-install info Linking react-native-google-analytics-bridge android dependency
rnpm-install info Android module react-native-google-analytics-bridge has been successfully linked
rnpm-install info iOS module react-native-google-analytics-bridge is already linked
ANYONE with a clue on what is causing this?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Could not find tools.jar. Please check that C:\Program Files ...
`What went wrong: Execution failed for task ':sample:compileReleaseJavaWithJavac'. Could not find tools.jar. Please check that C:\Program Files\ ...
Read more >Could not find tools.jar. Please check that C:\Program Files ...
Execution failed for task ':compileJava'. Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_221 contains a valid JDK ...
Read more >Gradle doesn't run because it can't find tools.jar in JRE
Execution failed for task ':app:compileDebugJavaWithJavac'. Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_121 ...
Read more >Could not find tools.jar - DEV Community
Problem: Execution failed for task ':react-native-gesture-handler:compileDebugJavaWithJavac'. Could not find tools.jar. Please check that / ...
Read more >Could not find tools.jar. Please check that C:\Program Files ...
Please make sure both JDK and jre are on same version Error : Could not find tools. jar. Please check that C:\Program Files\Java\jre1.8.0_151 ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It seems that there was an issue with the react-native-google-analytics-bridge package. It’s been removed in the latest major release.
Thanks for reporting and suggesting solutions
When I ran React Native project, I faced this issue/error. It was working fine before on other’s laptop, but now it isn’t Do you have any idea?
Looking forward to hear from you.