I'm using external libs added through #AdditionalJar which contain the use of okhttp.
My B4A project also uses okhttp, and I cannot modify those external libs. When I run the project, I receive this error:
When I remove the okhttp libs, the project runs just fine, but I want to be able to use the libs in the project.
How do Iimport both the libs and make this work?
My B4A project also uses okhttp, and I cannot modify those external libs. When I run the project, I receive this error:
B4X:
B4A Version: 9.90 BETA #2
Java Version: 11
Parsing code. (0.00s)
Building folders structure. (0.02s)
Compiling code. (0.06s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Generating R file. (0.00s)
Compiling debugger engine code. (0.77s)
Compiling generated Java code. (1.21s)
Convert byte code - optimized dex. Error
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokhttp3/Address;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokhttp3/Authenticator;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokhttp3/Authenticator$1;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokhttp3/Cache;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokhttp3/Cache$1;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokhttp3/Cache$2;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokhttp3/Cache$CacheRequestImpl;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokhttp3/Cache$CacheRequestImpl$1;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lokhttp3/Cache$CacheResponseBody;
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:692)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:315)
at com.android.dx.command.dexer.Main.runDx(Main.java:293)
at com.android.dx.command.dexer.Main.main(Main.java:249)
at com.android.dx.command.Main.main(Main.java:94)
Caused by: java.lang.InterruptedException: Too many errors
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:684)
... 4 more
When I remove the okhttp libs, the project runs just fine, but I want to be able to use the libs in the project.
How do Iimport both the libs and make this work?