0

I didn't change anything in my Flutter application and it was running perfectly but when i tried running on real device i got this exception FAILURE: Build failed with an exception.

* What went wrong: Execution failed for task ':bluetoothadapter:compileDebugJavaWithJavac'. > Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_321 contains a valid JDK installation. 
BUILD FAILED in 13s Exception: Gradle task assembleDebug failed with exit code 1 

1 Answer 1

1

Check out this post for a workaround:

tools.jar seems to be not in Android Studio classpath on Windows 8

It seems, the tools.jar is not present on every version of Java 8 anymore. Also make sure to use a JDK and not a pure JRE for development.

Maybe it is worth downloading a current version of the JDK from https://adoptopenjdk.net

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.