简体   繁体   中英

Gradle cannot find JAVA_HOME @Linux Mint

I use Android Studio und if i run a app, Gradle cannot find JAVA_HOME

  • What went wrong: Execution failed for task ':app:compileDebugJava'. Cannot find System Java Compiler. Ensure that you have installed a JDK (not just a JRE) and configured your JAVA_HOME system variable to point to the according directory.

But JAVA_HOME is set:

alexader@alexander-mint ~ $ echo $JAVA_HOME

returns

/usr/lib/jvm/java-8-oracle

What do i wrong?

Since your JAVA_HOME seems to work well, have a look at your Project Structure (Shortcut: Ctrl + Alt + Shift + S). Here you can define the location of your JDK. Sometimes this path is "wrong".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM