Java home supplied via 'org.gradle.java.home' is invalid. Invalid directory: /usr/local/java/jdk1.8.0_05
Solution 1:
Finally I found my solution. In the project root I found gradle.properties
configure this java home
org.gradle.java.home=/usr/local/java/jdk1.8.0_05
I remove and build it properly.
Solution 2:
-
Check the global gradle configuration in
C:\Users\<user>\.gradle
-
In your android project you will have a file named
gradle.properties
-
Delete
org.gradle.java.home=C:\\Program Files\\Java\\jdk1.8.0_144
Solution 3:
- In your android project you will have a file name gradle.properties.
- Open up that file, there will a line
org.gradle.java.home=C:\\Program Files\\Java\\jdk1.8.0_144
- You will have to change this line, insert your jdk setup location, most important use double backslashes "\\" like above in your path.