Android studio导入项目后异常和 升级2.2 之后 Maven插件不能使用解决

来源:互联网 发布:网络打码兼职正规网站 编辑:程序博客网 时间:2024/06/08 16:24

//转载的

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 ,可能是我的JDK同时装了1.7和1.8的JDK或者项目环境变量原因导致出错。


compile报下面的错误

Error:(2, 0) No service of type Factory<LoggingManagerInternal> available in ProjectScopeServices.
  • 1

点击open file 会跳转到apply plugin: 'com.github.dcendents.android-maven'这行。 
解决方案更新maven-plugin的依赖 
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' //gradle加上这个才是重点,从github上过来的没有gradle
到jcenter查看最新版本android-maven-gradle


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