close

How to solve Flutter could not find tools.jar?

Hello Guys How Are You All ? Hope You All Are Fine. When I Update my MacBook to macOS Big Sur version 11.0.1. I am Faced Flutter could not find tools.jar Error in my mac. So here is all possible way to solve flutter could not find tools.jar.

How Flutter could not find tools.jar error occurs?

* What went wrong:
Execution failed for task ':apple_sign_in:compileDebugJavaWithJavac'.
> Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.

How to solve Flutter could not find tools.jar?

  1. How to solve Flutter could not find tools.jar?

    to solve Flutter could not find tools.jar I Think Some Problem with JDK path That's Why facing This Error. So lets solve this error by all possible ways. Go to your android folder > Gradle.properties > add your jdk path. Clean and rebuild then it is done.

  2. Flutter could not find tools.jar

    to solve Flutter could not find tools.jar I Think Some Problem with JDK path That's Why facing This Error. So lets solve this error by all possible ways. Go to your android folder > Gradle.properties > add your jdk path. Clean and rebuild then it is done.

Solution 1: add your jdk path

I Think Some Problem with JDK path That’s Why facing This Error. So lets solve this error by all possible ways.

  1. Go to your android folder > Gradle.properties > add your jdk path.
  1. Clean and rebuild then it is done.
// For Example Purpose Only
org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home

Solution 2: JAVA_HOME variable was not set

Problem Is the JAVA_HOME variable was not set (or Big Sur removed it somehow).

So we simply added it in my ~/.zshrc (or ~/.bashrc)- profiles

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home

You can simply check and replace the version number in the above line.

Solution 3: Add jdk path

At last, here I found the solution.

Add jdk path

org.gradle.java.home=YOU_PATH_TO_JDK

to gradle.properties file and did a rebuild.

This Will Also Solve Your error.

Here is GitHub Error #575

Summery

So, Guys all 3 solutions are worked for me. let me know in the comment section if it is worked for you as well

Also Check Out Below Tutorials

1 thought on “How to solve Flutter could not find tools.jar?”

Leave a Comment