Error:Cause: org/gradle/api/publication/maven/internal/DefaultMavenFactory Android

方法一

  • 当你使用的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 文件中

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值