Error:(2, 0) Cause: org/gradle/api/publication/maven/internal/DefaultMavenFactory

来源:互联网 发布:74hc165数据手册 编辑:程序博客网 时间:2024/06/05 06:55

导入github上的工程报错

    Error:(2, 0) Cause: org/gradle/api/publication/maven/internal/DefaultMavenFactory    <a href="openFile:XXX\build.gradle">Open File</a>

点击Open File指向了

    apply plugin: 'com.github.dcendents.android-maven'

实际上问题发生在build.gradle(Project)中

    buildscript {        repositories {            jcenter()        }        dependencies {            //你的其他配置            classpath 'com.github.dcendents:android-maven-plugin:1.3'            // NOTE: Do not place your application dependencies here; they belong            // in the individual module build.gradle files        }    }

    classpath 'com.github.dcendents:android-maven-plugin:1.2'

改为

    classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'

再编译就能通过了

另附

Plugin Version Plugin Name Dependency Information Gradle Version 1.0 android-maven com.github.dcendents:android-maven-plugin:1.0 1.8+ 1.1 android-maven com.github.dcendents:android-maven-plugin:1.1 1.12+ 1.2 com.github.dcendents.android-maven com.github.dcendents:android-maven-plugin:1.2 2.2+ 1.3 com.github.dcendents.android-maven com.github.dcendents:android-maven-gradle-plugin:1.3 2.4+ 1.4 com.github.dcendents.android-maven com.github.dcendents:android-maven-gradle-plugin:1.4 2.14+
0 0
原创粉丝点击