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 有可能導致該錯誤

原博客地址

發佈了50 篇原創文章 · 獲贊 20 · 訪問量 3萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章