Ensure that you have installed a JDK (not just a JRE) and configured your JAVA_HOME system variable

来源:互联网 发布:淘宝商城亚维尔娜 编辑:程序博客网 时间:2024/06/09 22:20

       出现错误的原因是:

          gradle的版本过低导致的

  
   解决办法:

          将build.gradle文件里的

        classpath 'com.android.tools.build:gradle:1.3.0'        修改为
       classpath 'com.android.tools.build:gradle:2.2.3'



          如果再次编译时遇到:

          Error:No service of type Factory<LoggingManagerInternal> available in Project

          即是因为maven的版本过低导致。将build.gradle修改如下:

     dependencies {        classpath 'com.android.tools.build:gradle:2.2.3'        classpath'com.github.dcendents:android-maven-gradle-plugin:1.4.1'        classpath'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.3.1'        // NOTE: Do not place your application dependencies here; they belong        // in the individual module build.gradle files        }
         接下来编译通过。


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