Android编译时报错:Ensure that you have installed a JDK(not just a JRE)and configured your JAVA_HOME......

来源:互联网 发布:php虚拟物品商城 编辑:程序博客网 时间:2024/06/08 04:00

编写不易,如有转载,请声明出处: 梦回河口:http://blog.csdn.net/zxc514257857/article/details/72782785

报错的全称为:

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

解决方法:

  可能是你使用的JDK是AndroidStudio默认的JDK,而不是自己下载的JDK7或JDK8,在file—>Other Settings —>Default Project Structure 中找到:
这里写图片描述
  确保更换为自己的JDK,问题就可以解决!

———-因本人才疏学浅,如博客或Demo中有错误的地方请大家随意指出,与大家一起讨论,共同进步,谢谢!———-

阅读全文
0 0
原创粉丝点击