詳細報錯信息如下
Error:Execution failed for task ':app:compileDebugJavaWithJavac'. > 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.
原因
你要導入項目的gradle版本不對,要么過高要么過低,建議將gradle版本改為新建項目的gradle版本**
解決方案
在找到project下面的build.gradle,修改gradle版本。如果不知道具體是哪個版本,可以直接復制新建項目的build.gradle版本。比如:將classpath ‘com.Android.tools.build:gradle:1.3.0’修改為classpath ‘com.android.tools.build:gradle:2.2.3’
