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

时间:2024-04-03 13:19:59

如果最近小伙伴们遇到了这个错误:
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/intermediates/transforms/dexBuilder/debug/14.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/15.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/16.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/17.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/18.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/19.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/20.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/21.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/22.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/23.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/24.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/25.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/26.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/27.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/28.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/29.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/30.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/31.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/32.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/33.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/34.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/35.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/36.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/37.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/38.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/39.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/40.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/41.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/42.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/43.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/44.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/45.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/46.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/47.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/48.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/49.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/50.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/51.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/52.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/53.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/54.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/55.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/56.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/57.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/58.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/59.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/60.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/61.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/62.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/63.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/64.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/65.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/66.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/67.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/68.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/69.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/70.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/71.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/72.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/73.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/74.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/75.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/76.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/77.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/78.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/79.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/80.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/81.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/82.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/83.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/84.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/85.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/86.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/87.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/88.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/89.jar, /android/android_program/pwqgc/app/build/intermediates/transforms/dexBuilder/debug/90.jar

解决:把项目下的gradle-wrapper.propertiesAGPBI: {"kind":"error","text":"Program type already present: com.blankj.utilcode.BuildConfig","sourc
里面的
AGPBI: {"kind":"error","text":"Program type already present: com.blankj.utilcode.BuildConfig","sourc
划红线的换成你可以运行项目下的gradle版本地址即可