Gradle Does Not Find Tools.Jar

Gradle does not find tools.jar

Found it. System property 'java.home' is not JAVA_HOME environment variable. JAVA_HOME points to the JDK, while java.home points to the JRE. See that page for more info.

Soo... My problem was that my startpoint was the jre folder (C:\jdk1.6.0_26\jre) and not the jdk folder (C:\jdk1.6.0_26) as I thought(tools.jar is on the C:\jdk1.6.0_26\lib folder ). The compile line in dependencies.gradle should be:

compile files("${System.properties['java.home']}/../lib/tools.jar")

Eclipse Gradle build Could not find tools.jar

OK, I got my problem solved finally. It is very easy, I re-installed the JDK. Somehow the stupid Eclipse (or Gradle plugin, I still not sure which goes wrong) just can't recognize my old JDK path.

After I re-installed JDK (take this chance, I upgrade JDK 7 to 8 also), I don't even need Java_home environment variable, it works.

Gradle Could not find tools.jar

You have to set the system property "java.home" and the environment variable JAVA_HOME to a valid JDK.

To set the environment variable run:
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

Flutter could not find tools.jar

THREAD CLOSED

I'm a Mac user. I've found the solution by using this method.

  1. Go to your android folder > Gradle.properties > add your jdk path.
// Example 
org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home

  1. Clean and rebuild then it's done.

Gradle build tools.jar not found

I installed jdk and the ran $yum install java-1.8.0-openjdk-devel.After this build was successfull using same jre path



Related Topics



Leave a reply



Submit