Android Question Dex merge Error Type okio.-Base64 is defined multiple times:

Fabio vega

Member
Licensed User
Longtime User
Hello, I tried to compile, with B4a 13. I have those errors:

Dex merge Error
Error in C:\sdk-2024\tools\..\extras\b4a_local\unpacked-okio-1.17.5-63792636470000\dex_v1\okio-1.17.5.zip:classes.dex:
Type okio.-Base64 is defined multiple times:

my Libraries:
 

Fabio vega

Member
Licensed User
Longtime User
Hello, I attached full message, Thanks for your response:

B4A Version: 13.00
Parsing code. (0.38s)
Java Version: 19
Building folders structure. (0.14s)
Compiling code. (0.80s)

ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code. (0.03s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Compiling resources (0.25s)
Linking resources (4.28s)
build tools: 34.0.0, android jar: android-34
Compiling generated Java code. (7.36s)
Finding libraries that need to be dexed. (0.06s)
Dex code (9.43s)
Dex merge Error
Error in C:\sdk-2024\tools\..\extras\b4a_local\unpacked-okhttp-3.12.12-63759457672000\dex_v1\okhttp-3.12.12.zip:classes.dex:
Type okhttp3.Address is defined multiple times: C:\sdk-2024\tools\..\extras\b4a_local\unpacked-okhttp-3.12.12-63759457672000\dex_v1\okhttp-3.12.12.zip:classes.dex, C:\sdk-2024\tools\..\extras\b4a_local\unpacked-okhttp-4.9.0-63860280576000\dex_v1\okhttp-4.9.0.zip:classes.dex
Compilation failed
Exception in thread "main" java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\sdk-2024\tools\..\extras\b4a_local\unpacked-okhttp-3.12.12-63759457672000\dex_v1\okhttp-3.12.12.zip:classes.dex
at com.android.tools.r8.internal.po.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:1269)
at com.android.tools.r8.D8.main(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:5)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\sdk-2024\tools\..\extras\b4a_local\unpacked-okhttp-3.12.12-63759457672000\dex_v1\okhttp-3.12.12.zip:classes.dex
at Version.fakeStackEntry(Version_8.3.37.java:0)
at com.android.tools.r8.Q.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:5)
at com.android.tools.r8.internal.po.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:244)
at com.android.tools.r8.internal.po.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:90)
at com.android.tools.r8.internal.po.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:909)
at com.android.tools.r8.internal.po.b(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:99)
at com.android.tools.r8.D8.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:1041)
at com.android.tools.r8.D8.b(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:514)
at com.android.tools.r8.D8.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:1076)
at com.android.tools.r8.internal.po.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:1256)
... 1 more
Caused by: com.android.tools.r8.internal.h: Type okhttp3.Address is defined multiple times: C:\sdk-2024\tools\..\extras\b4a_local\unpacked-okhttp-3.12.12-63759457672000\dex_v1\okhttp-3.12.12.zip:classes.dex, C:\sdk-2024\tools\..\extras\b4a_local\unpacked-okhttp-4.9.0-63860280576000\dex_v1\okhttp-4.9.0.zip:classes.dex
at com.android.tools.r8.internal.X30.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:346)
at com.android.tools.r8.internal.pX.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:232)
at com.android.tools.r8.internal.pX.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:91)
at java.base/java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:2056)
at com.android.tools.r8.internal.pX.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:32)
at com.android.tools.r8.graph.q4$a.d(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:6)
at com.android.tools.r8.dex.c.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:264)
at com.android.tools.r8.dex.c.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:222)
at com.android.tools.r8.dex.c.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:219)
at com.android.tools.r8.D8.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:809)
at com.android.tools.r8.D8.d(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:212)
at com.android.tools.r8.D8.c(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:163)
at com.android.tools.r8.internal.po.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:906)
... 6 more
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
You have some outdated libraries. Update them
 
Upvote 1
Cookies are required to use this site. You must accept them to continue using the site. Learn more…