帖子
帖子
用户
博客
课程
显示全部楼层
3
帖子
0
勋章
16
Y币

[插件开发] 自定义模块云编译报错

[复制链接]
发表于 2021-10-15 21:02:33
上个月云编译的时候还是没问题的,生成的loader的在手机上可以运行。
今天迭代开发时遇到了问题,老的自定义模块打包后上传云编译会报错,报错信息:

说是类重复被引用,但上个月编译的时候都是好的。
是有更新吗,需要怎么设置,请技术大佬帮忙解决,谢谢!!
3
帖子
0
勋章
16
Y币
报错信息:
2021-10-15 08:52:55

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkReleaseDuplicateClasses'.
> 1 exception was raised by workers:
  java.lang.RuntimeException: Duplicate class androidx.core.content.res.ColorStateListInflaterCompat found in modules core-1.0.0-runtime.jar (androidx.core:core:1.0.0) and jetified-appcompat-v7-26.0.0-runtime.jar (appcompat-v7-26.0.0.aar)
  Duplicate class androidx.core.content.res.GrowingArrayUtils found in modules core-1.0.0-runtime.jar (androidx.core:core:1.0.0) and jetified-appcompat-v7-26.0.0-runtime.jar (appcompat-v7-26.0.0.aar)
  
  Go to the documentation to learn how to <a href="d**.**/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help**.**

BUILD FAILED in 43s
130
帖子
7
勋章
5万+
Y币
sai4ever 发表于 2021-10-15 21:04
报错信息:
2021-10-15 08:52:55


implementation ('com.android.support:appcompat-v7:+') {
exclude module: 'appcompat-v7'
exclude group: 'com.android.support'
}

类似这样处理一下
3
帖子
0
勋章
16
Y币
520707liu 发表于 2021-10-16 06:29
implementation ('com.android.support:appcompat-v7:+') {
exclude module: 'appcompat-v7'
exclude gr ...

还是不行 报相同的错,为什么上个月还能编译成功的,现在云编译就会报错。
我的gradle里都没有引用com.android.support:appcompat-v7相关的,只引用了andriodx.appcompat,如下:
    // 添加aar需要的第三方依赖
    testImplementation 'junit:junit:4.13'
    implementation 'com.alibaba:fastjson:1.1.46.android'
    implementation 'com.facebook.fresco:fresco:1.13.0'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.tencent.bugly:crashreport:3.2.3'
    implementation 'com.tencent.bugly:nativecrashreport:3.6.0.1'
    implementation 'com.squareup.okhttp3khttp:3.8.1'
    implementation 'com.squareup.okiokio:1.17.2'
    implementation "com.squareup.okhttp3:logging-interceptor:3.8.1"
    implementation "com.google.code.gson:gson:2.8.5"
130
帖子
7
勋章
5万+
Y币
sai4ever 发表于 2021-10-17 15:26
还是不行 报相同的错,为什么上个月还能编译成功的,现在云编译就会报错。
我的gradle里都没有引用com.an ...

那就是其他模块引用了
您需要登录后才可以回帖 登录

本版积分规则