android release 无法导出aar,android 无法转换文件“ some-lib-release.aar”以匹配属性{artifactType = processed-aar} usi...

我有2个模块的一个项目:一个应用程序(JAVA)与构建类型debug,release以及enterprise和科特林库(release以及debug由应用程序使用)。

我正在使用AndroidX,并且在我的手机中包含以下内容gradle.properties:

android.useAndroidX=true

android.enableJetifier=true

如果我通过Gradle运行项目,则会遇到一堆编译错误(预期)。但是,如果我尝试从Android Studio(3.2 Beta 5)中使用它,特别是在尝试与Gradle模型同步时,就会得到以下信息:

Unable to resolve dependency for ':app@debug/compileClasspath': Failed to transform file 'some-lib-release.aar' to match attributes {artifactType=processed-aar} using transform JetifyTransform

Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Failed to transform file 'some-lib-release.aar' to match attributes {artifactType=processed-aar} using transform JetifyTransform

Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Failed to transform file 'some-lib-release.aar' to match attributes {artifactType=processed-aar} using transform JetifyTransform

Unable to resolve dependency for ':app@release/compileClasspath': Failed to transform file 'some-lib-release.aar' to match attributes {artifactType=processed-aar} using transform JetifyTransform

Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Failed to transform file 'some-lib-release.aar' to match attributes {artifactType=processed-aar} using transform JetifyTransform

Unable to resolve dependency for ':app@enterprise/compileClasspath': Failed to transform file 'some-lib-release.aar' to match attributes {artifactType=processed-aar} using transform JetifyTransform

Unable to resolve dependency for ':app@enterpriseUnitTest/compileClasspath': Failed to transform file 'some-lib-release.aar' to match attributes {artifactType=processed-aar} using transform JetifyTransform

我的settings.gradle:

include ':app',':some-lib'

project(':some-lib').projectDir = file ('../some-lib/lib')

库模块最终将是该应用程序和其他应用程序使用的自己的库,但是当我在使用它时,我将其构建为应用程序的一部分。一切正常,直到我切换到AndroidX。

该app模块将依赖项声明为:

implementation project(path: ':some-lib', configuration: 'default')

如果configuration: 'default'在声明依赖项时忽略了一点,则会得到:

Unable to resolve dependency for ':app@enterprise/compileClasspath': Could not resolve project :some-lib.

Unable to resolve dependency for ':app@enterpriseUnitTest/compileClasspath': Could not resolve project :some-lib.

对我在这里做错的任何想法吗?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值