美文网首页
Incompatible because this compon

Incompatible because this compon

作者: 一个冬季 | 来源:发表于2023-09-20 18:38 被阅读0次

错误

Failed to transform com-gxx-1.1.2.aar (com.mlwj:com-gxx:1.1.2) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-incremental-transform=true, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
     > Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
        > No variants of com.facebook.conceal:conceal:1.1.3 match the consumer attributes:
            - com.facebook.conceal:conceal:1.1.3 configuration runtime:
                - Incompatible because this component declares attribute 'artifactType' with value 'aar.asc' and the consumer needed attribute 'artifactType' with value 'android-classes-jar'
                - Other compatible attributes:
                    - Doesn't say anything about asm-transformed-variant (required 'NONE')
                    - Doesn't say anything about dexing-enable-desugaring (required 'true')
                    - Doesn't say anything about dexing-incremental-transform (required 'true')
                    - Doesn't say anything about dexing-is-debuggable (required 'true')
                    - Doesn't say anything about dexing-min-sdk (required '21')

昨天刚刚写完 android studio maven-publish 配置 今天就遇到这样的错误,从上面的异常里面可以看出,是从我的 com.mlwj:com-gxx:1.1.2 SDK报出来的错误,因为这个SDK引入了 implementation com.facebook.conceal:conceal:1.1.3@aar ,由依赖传递性,也会导致pom里面添加他的依赖,pom添加他的依赖是 implementation "com.facebook.conceal:conceal:1.1.3"不会携带@aar。
上面的错误信息里面有个比较关键的提示点,'artifactType' with value 'aar.asc',我想我也没有设置过artifactType,我也不知道这个artifactType是什么 ,我只能说时facebook当时在上传的时候,类型aar.arc

1.1.3版本_conceal_aar_arc.jpg
看来不仅仅是我一个人会有这个问题,其他人原来也有aar.arc错误,faceBook的自己人也说了,是在配置的时候,多配置了
configurations {
    archives {
        extendsFrom configurations.default
    }
}

configurations.default里面估计就是aar.arc类型,不过好在他们在2.0.2版本进行删除了上面的代码

解决方案

1、更新依赖 implementation 'com.facebook.conceal:conceal:2.0.2'
2、SDK里面剔除 implementation com.facebook.conceal:conceal:1.1.3@aar,项目里面单独引用

相关文章

网友评论

      本文标题:Incompatible because this compon

      本文链接:https://www.haomeiwen.com/subject/cwkavdtx.html