Android Studio 错误 Cannot find System Java Compiler

Error:Execution failed for task ':xxxxx: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.


Android studio环境下,新建的项目正常,导入其他项目出现这么一个异常

解决方法

File-->Project Structrue-->SDK Location-->JDK location  

Use embedded JDK 前面勾去掉,指定一个JDK地址。

默认使用的embedded JDK 有可能导致该错误

原博客地址

Error:Execution failed for task ':xxxxx: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.


Android studio环境下,新建的项目正常,导入其他项目出现这么一个异常

解决方法

File-->Project Structrue-->SDK Location-->JDK location  

Use embedded JDK 前面勾去掉,指定一个JDK地址。

默认使用的embedded JDK 有可能导致该错误

原博客地址

猜你喜欢

转载自blog.csdn.net/qq_32227681/article/details/74856872