Delphi 报错 Type androidx.collection.ArraySet is defined multiple times

Delphi 11 建立一个新的 Multi-Device Application 编译成app的时候报错

报错信息

[PAClient Error] Error: E7688 Unable to execute '"E:\Program\Java\jdk1.8.0_301\bin\java.exe" -cp "e:\program\embarcadero\studio\22.0\bin\Android\r8-3.3.28.jar" com.android.tools.r8.D8 --release --min-api 23 --output "E:\Data\DelphiProject11\测试安卓证书\Android64\Debug\Project2.classes" @"E:\Data\DelphiProject11\测试安卓证书\Android64\Debug\dex_list.txt"' (Error 1)
[PAClient Error] Error: E7688 Error in e:\program\embarcadero\studio\22.0\lib\android\Debug\collection-1.1.0.dex.jar:classes.dex:
[PAClient Error] Error: E7688 Type androidx.collection.ArraySet is defined multiple times: e:\program\embarcadero\studio\22.0\lib\android\Debug\collection-1.1.0.dex.jar:classes.dex, e:\program\embarcadero\studio\22.0\lib\android\Debug\collection-1.0.0.dex.jar:classes.dex
[PAClient Error] Error: E7688 Compilation failed
[PAClient Error] Error: E7688 Exception in thread "main" java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: e:\program\embarcadero\studio\22.0\lib\android\Debug\collection-1.1.0.dex.jar:classes.dex
[PAClient Error] Error: E7688 	at com.android.tools.r8.internal.Bj.a(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:98)
[PAClient Error] Error: E7688 	at com.android.tools.r8.D8.main(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:4)
[PAClient Error] Error: E7688 Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: e:\program\embarcadero\studio\22.0\lib\android\Debug\collection-1.1.0.dex.jar:classes.dex
[PAClient Error] Error: E7688 	at Version.fakeStackEntry(Version_3.3.28.java:0)
[PAClient Error] Error: E7688 	at com.android.tools.r8.internal.Bj.a(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:75)
[PAClient Error] Error: E7688 	at com.android.tools.r8.internal.Bj.a(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:28)
[PAClient Error] Error: E7688 	at com.android.tools.r8.internal.Bj.a(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:27)
[PAClient Error] Error: E7688 	at com.android.tools.r8.internal.Bj.b(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:2)
[PAClient Error] Error: E7688 	at com.android.tools.r8.D8.a(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:22)
[PAClient Error] Error: E7688 	at com.android.tools.r8.D8.a(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:17)
[PAClient Error] Error: E7688 	at com.android.tools.r8.internal.Bj.a(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:85)
[PAClient Error] Error: E7688 	... 1 more
[PAClient Error] Error: E7688 Caused by: com.android.tools.r8.internal.f: Type androidx.collection.ArraySet is defined multiple times: e:\program\embarcadero\studio\22.0\lib\android\Debug\collection-1.1.0.dex.jar:classes.dex, e:\program\embarcadero\studio\22.0\lib\android\Debug\collection-1.0.0.dex.jar:classes.dex
[PAClient Error] Error: E7688 	at com.android.tools.r8.internal.DT.a(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:14)
[PAClient Error] Error: E7688 	at com.android.tools.r8.internal.DT.a(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:22)
[PAClient Error] Error: E7688 	at com.android.tools.r8.internal.CN.a(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:33)
[PAClient Error] Error: E7688 	at com.android.tools.r8.internal.CN.a(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:10)
[PAClient Error] Error: E7688 	at java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:1990)
[PAClient Error] Error: E7688 	at com.android.tools.r8.internal.CN.a(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:6)
[PAClient Error] Error: E7688 	at com.android.tools.r8.graph.B2$a.e(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:4)
[PAClient Error] Error: E7688 	at com.android.tools.r8.dex.b.a(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:105)
[PAClient Error] Error: E7688 	at com.android.tools.r8.dex.b.a(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:28)
[PAClient Error] Error: E7688 	at com.android.tools.r8.D8.a(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:25)
[PAClient Error] Error: E7688 	at com.android.tools.r8.D8.d(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:606)
[PAClient Error] Error: E7688 	at com.android.tools.r8.D8.c(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:1)
[PAClient Error] Error: E7688 	at com.android.tools.r8.internal.Bj.a(R8_3.3.28_2aaf796388b4e9f6bed752d926eca110512a53a3f09a8d755196089c1cfdf799:24)
[PAClient Error] Error: E7688 	... 5 more
Failed

看到了这行报错

[PAClient Error] Error: E7688 Type androidx.collection.ArraySet is defined multiple times: e:\program\embarcadero\studio\22.0\lib\android\Debug\collection-1.1.0.dex.jar:classes.dex, e:\program\embarcadero\studio\22.0\lib\android\Debug\collection-1.0.0.dex.jar:classes.dex

发现是jar包同时使用了不同的版本导致的,于是要去掉一个,保留最新版本即可

找到该项目的Libraries,将有重复名称但是版本不同的jar包 disable 掉
在这里插入图片描述

在这里插入图片描述

然后重新build,就通过了

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

张猿

0元代表鼓励,1元代表认可

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值