使用AS过程中 会遇到各种问题,记录下来,方便以后查阅。
问题:Error:Cause: org/gradle/api/publication/maven/internal/DefaultMavenFactoryAndroid
原因:当你使用的Gradle版本是2.4以上,Android插件版本是1.3.0以上的时候就会出现这个问题
解决:这时候你只需将android-maven-gradle-plugin插件版本改为classpath ‘com.github.dcendents:android-maven-gradle-plugin:1.3’ 和classpath 'com.github.dcendents:android-maven-plugin:1.2' 即可(注意:1.3必须在1.2的前面)
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
}