方法一
- 当你使用的Gradle版本是2.4以上,Android插件版本是1.3.0以上的时候就会出现这个问题,这时候你只需将android-maven-gradle-plugin插件版本改为classpath ‘com.github.dcendents:android-maven-gradle-plugin:1.3’即可
我则是把该引用库的build.gradle 中的apply plugin: ‘android-maven’ 删掉就可用了。
方法二
I was also facing same issue few days back. I solved it by updating maven plugin version and gradle-maven-plugin version. I updated plugin from
apply plugin: 'android-maven'
to
apply plugin: 'com.github.dcendents.android-maven'
and gradle version from
classpath 'com.github.dcendents:android-maven-plugin:1.2'
to
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
Hope it solves your issue also
备注:
classpath: 在根目录的.gradle 文件中