Android Question Error compiling after clean install

QtechLab

Active Member
Licensed User
Longtime User
I formatted my PC with a clean install of W10Pro Licensed.
After installing all the needed components i'm having an error when i compile my app.

B4A 9.50 licensed, JDK 11.0.1, Android SDK platform 28

B4X:
B4A Versione: 9.50
Java Versione: 11
Analisi del Codice.    (0.42s)
Building folders structure.    (5.57s)
Compilazione del codice.    (2.21s)
Compilazione del codice di layouts    (0.56s)
Organizzazione Librerie.    (0.00s)
    (AndroidX SDK)
Generazione file R.    (0.60s)
Compilazione del codice debugger.    (10.50s)
Compilazione del codice Java prodotto.    (8.49s)
Conversione byte code - ottimizzazione 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/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;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroidx/annotation/CheckResult;
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
 

QtechLab

Active Member
Licensed User
Longtime User
Which libraries are referenced?
a lot of. Some libraries are linked in additional folder

Cattura.JPG


In additional libraries i set

Cattura2.JPG
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
remove the line

<dependsOn>android-support-annotations</dependsOn>

from the newqrcodereaderview.xml

You also can remove all android-support-annotations*.* files from the additional libs folder. They are not needed.
 
Last edited:
Upvote 0

QtechLab

Active Member
Licensed User
Longtime User
It seems that include both XUI and XUI VIews causes the error.
Removing XUI from linked libraries allow me to compile again
 
Upvote 0

QtechLab

Active Member
Licensed User
Longtime User
I don´t believe any of these two raises your problem....
I really do not know, but now it works.
The error means:
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroidx/annotation/AnimRes;
So i started uncheck libraries that could be duplicate
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
The error means:
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroidx/annotation/AnimRes;
check if you have any other lib from johan added.

Check if there is a dependency for annotations in the library XML. If so; remove the dependency.
 
Upvote 0
Top