Android Studio on mac: cant find System Compiler

I get this on one of my poppies when I try to compile even "hello world"

Error: execution completed for task ': app: compileDebugJava'.

Unable to find System Java compiler. Make sure you install the JDK (and not just the JRE) and configure the JAVA_HOME system variable to specify the appropriate directory.

On my other mac, I have no problems. The setup is the same as far as I can tell. It's just for some reason, on the same machine, Android Studio / Gradle is displaying this error message.

I have installed

JAVA_HOME = / Library / Java / JavaVirtualMachines / jdk1.7.0_60.jdk / Contents / Home

running / usr / libexec / java_home gives:

/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home

javac -version :

javac 1.7.0_60-ea

java -version :

java "1.7.0_60-ea"

Java (TM) SE Runtime Environment ( 1.7.0_60-ea-b15)

Java HotSpot (TM) 64- VM ( 24.60-b09, )

Android Studio file- > - > → JDK JDK, .

, ?

, Ive .

+4
3

- Java Jar, Android. , tools.jar auskey.jar /​​Library/Java/Extensions

+2

Rich_LogicBox . java, . jar, /Library/Java/Extensions auskey, Android Studio .

+1

:

Android jdk 1.6+ , JDK 1.7.

show the package content Android Studio Applications info.plist, JVM version JDK, 1.7 *.

( , JDK 1,8 )

enter image description here

0

Source: https://habr.com/ru/post/1543369/


All Articles