AGPBI: {"kind":"error","text":"Program type already present: com.blankj.utilcode.BuildConfig","sourc

本文介绍了在Android开发中遇到的'Program type already present: com.blankj.utilcode.BuildConfig'错误,该错误是由于类冲突导致的。通过分析错误日志,发现是 DexArchiveMergerException,即多个库中存在相同类。解决方案是检查并更新项目中的gradle-wrapper.properties文件,将Gradle版本替换为项目兼容的版本,以避免类重复问题。
摘要由CSDN通过智能技术生成

如果最近小伙伴们遇到了这个错误:
AGPBI: {“kind”:“error”,“text”:“Program type already present: com.blankj.utilcode.BuildConfig”,“sources”:[{}],“tool”:“D8”}

Task :app:buildInfoGeneratorDebug
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForDebug’.

com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/0.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/1.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/2.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/3.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/4.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/5.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/6.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/7.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/8.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/9.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/10.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/11.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/12.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/13.jar, /android/android_program/pwqgc/app/build/int

评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值