question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Execution failed for task ':react-native-google-analytics-bridge:compileReleaseJavaWithJavac'. Could not find tools.jar

See original GitHub issue

Environment

  1. Windows 10
  2. Android - Note 5 running 6.0.1
  3. Standard SDK 5.6.0, Premium SDK 2.6.0

image

image

Steps to reproduce

  1. 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:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mcnameecommented, Jan 1, 2018

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

0reactions
scarletks1214commented, Aug 10, 2019

error

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found