导入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+ |