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.
- 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
- 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
How to Set Android Lock Screen Image
How to Get Specific Pushedid in Firebase
Can't Make Jdbc Connection to MySQL (Using Java, Intellij, and Linux)
How to Scroll a Scrollview Programmatically in Android
Android Library Gradle Release Jar
Can the Android Sdk Work with Jdk 1.7
Countdowntimer in Minutes and Seconds
Recyclerview Item Click Listener the Right Way
Create a New Textview Programmatically Then Display It Below Another Textview
Database Not Copying from Assets
JSONparser from Androidhive Tutorial, Nosuchmethoderror in Defaulthttpclient
How to Check If Current Thread Is Not Main Thread
Jsp, Can It Work Similar to Yield, Layout, Content_For in Ruby/Rails/Erb
Android - Change App Theme on Onclick
What's the Syntax for Mod in Java