as安装过程中gradle_AS升级3.0,gradle plugin 升级到3.0.0遇到的问题

在Android Studio升级gradle插件到3.0.0时,可能会遇到包括apkVariantData属性错误、特定编译配置问题、multidex依赖解析失败、outputFile属性只读等问题。解决方案包括移除Tinker相关配置、使用implementation替换旧的编译方式、添加新的repository以及使用allprojects替代each来修改outputFileName。通过在gradle.properties中设置属性来区分不同版本的配置处理。欢迎分享更多升级过程中的问题和解决方案。
摘要由CSDN通过智能技术生成

1.Error:Could not get unknown property 'apkVariantData' for object of type com.android.build.gradle.internal.api.ApplicationVariantImpl.

答:这个是因为Tinker中用到了apkVariantData属性,我们可以将tiner的gradle去除掉。上面是发现tinker有问题,另外发现GrowingIO也有这个问题,如果用的是gradle plugin3.0.0的话也需要去掉,如果还有童鞋有补充的,欢迎留言。

2.如果你的项目用到了,类似releaseCompile或者debugCompile的情况,根据配置来进行编译,会报如下的错误

Error:Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve project :library.

Error:Unable to resolve dependency for ':app@release/compileClasspath': Could not resolve project :library.

可以用下面的语句来进行替换

dependencies {

implementation project(':library')

// You can, however, keep using variant-specific configurations when

// targeting external dependencies. The following line adds 'app-magic'

// as

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值