Bug? IllegalArgumentException

wimpie3

Well-Known Member
Licensed User
Longtime User
Not sure this is a bug but this problem turned up right after switching to B4A v9:
B4X:
Convert byte code - optimized dex.    Error
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/compat/R;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/compat/R$attr;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/compat/R$color;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/compat/R$dimen;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/compat/R$drawable;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/compat/R$id;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/compat/R$integer;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/compat/R$layout;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/compat/R$string;
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:696)
    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:688)
    ... 4 more
This happens when I call a module that has been precompiled in B4A using "compile to library".
 

wimpie3

Well-Known Member
Licensed User
Longtime User
I've manually removed the android directory from the JAR file B4A created, and now it works. But this means each and every time I touch the compiled library, I have to remove those files :-(

I did some further research, and as soon as I include Amir_Recycleview and use "Compile To A Library", an android directory is added in the JAR file which causes those conflicts.
 
Last edited:
Top