Unsure if this is related to the B4A v9.80 #2 beta or my newly wrapped library.
I have 2 Android SDK folders, both located in C on my harddrive. One is the standard one I am using with Android Studio whereas the 2nd one I have called AndroidSDKB4A which I am keeping update using B4A's SDK Manager. In B4A's IDE configuration path I am pointing normally to the latest android.jar present in AndroidSDKB4A
The library I have wrapped is using Target SDK 29 because there are some methods that are optimized for SDK29. If the device is not SDK29, those methods will be skipped.
When trying to compile with android.jar (v. 29 but also v 28) pointing to AndroidSDKB4A, I get the following error:
If I, however, configure the B4A IDE configuration to use the andoid.jar in my standard Android Studio SDK folder, the project compiles just fine.
Both SDK locations are up-to-date. Unfortunately, I did not install the beta in a separate folder so I am unable to test with the earlier version.
As I said, I am not really sure what the problem is. It seems odd.
I have 2 Android SDK folders, both located in C on my harddrive. One is the standard one I am using with Android Studio whereas the 2nd one I have called AndroidSDKB4A which I am keeping update using B4A's SDK Manager. In B4A's IDE configuration path I am pointing normally to the latest android.jar present in AndroidSDKB4A
The library I have wrapped is using Target SDK 29 because there are some methods that are optimized for SDK29. If the device is not SDK29, those methods will be skipped.
When trying to compile with android.jar (v. 29 but also v 28) pointing to AndroidSDKB4A, I get the following error:
B4X:
B4A Version: 9.80 BETA #2
Java Version: 8
Parsing code. (0.00s)
Building folders structure. (0.18s)
Compiling code. (0.05s)
Compiling layouts code. (0.02s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Generating R file. (0.54s)
Compiling debugger engine code. (1.22s)
Compiling generated Java code. (2.02s)
Convert byte code - optimized dex. Error
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroidx/annotation/AnimRes;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroidx/annotation/AnimatorRes;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroidx/annotation/AnyRes;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroidx/annotation/AnyThread;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroidx/annotation/ArrayRes;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroidx/annotation/AttrRes;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroidx/annotation/BinderThread;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroidx/annotation/BoolRes;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroidx/annotation/CallSuper;
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
If I, however, configure the B4A IDE configuration to use the andoid.jar in my standard Android Studio SDK folder, the project compiles just fine.
Both SDK locations are up-to-date. Unfortunately, I did not install the beta in a separate folder so I am unable to test with the earlier version.
As I said, I am not really sure what the problem is. It seems odd.
Last edited: