AGP Gradle 的一些问题记录

5 篇文章 0 订阅
1 篇文章 0 订阅

AGP Gradle 的一些问题记录

7.0.4 版本环境, as: Build #AI-211.7628.21.2111.8139111, built on February 2, 2022

allprojects {
configurations.all {

        resolutionStrategy.dependencySubstitution {
            //project&module依赖关系切换处理
            substitute(project(":--hw_modules:lib_motherboard_Haitianxiong")) using(module("cn.mashang.hw_modules:lib_motherboard_Haitianxiong:1.1.5")) //正确的
            //substitute(module("cn.mashang.hw_modules:lib_motherboard_Haitianxiong:1.1.5")) using(project(":--hw_modules:lib_motherboard_Haitianxiong")) 错误的
        }
    }
}

错误提示,看起来很蒙逼,我灵机一动切换过来的

Could not determine the dependencies of task ':VScreen:compileVscreen_baseDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':VScreen:vscreen_baseDebugCompileClasspath'.
   > Could not resolve cn.mashang.hw_modules:lib_motherboard_Haitianxiong:1.1.5.
     Required by:
         project :VScreen
      > No matching configuration of project :--hw_modules:lib_motherboard_Haitianxiong was found. The consumer was configured to find an API of a component, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute '220211' with value 'vscreen_base' but:
          - None of the consumable configurations have attributes.

官方介绍,写法也是错误的
网上配置方式也是错误

具体原因应该是版本改动

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值