Android Question Error loading NewQRCodeReaderView library.

MrKim

Well-Known Member
Licensed User
Longtime User
QRCodeReaderView loads just fine, but I tried the newer version NewQRCodeReaderView and I get the following compiler errors. I cleaned the project but it didn't help..

B4X:
B4A Version: 10.0
Java Version: 8
Parsing code.    (0.28s)
Building folders structure.    (0.22s)
Running custom action.    (0.16s)
Compiling code.    (1.46s)
Compiling layouts code.    (0.04s)
Organizing libraries.    (0.00s)
    (Android Support Library)
Generating R file.    (0.00s)
Compiling debugger engine code.    (1.61s)
Compiling generated Java code.    (1.58s)
Convert byte code - optimized dex.    Error
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/AnimRes;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/AnimatorRes;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/AnyRes;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/ArrayRes;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/AttrRes;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/BinderThread;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/BoolRes;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/CallSuper;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/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

any help appreciated....
 

DonManfred

Expert
Licensed User
Longtime User
(Android Support Library)
you should switch to use AndroidX.

follow the installationinstructions here and it just will work:
 
Upvote 0

MrKim

Well-Known Member
Licensed User
Longtime User
you should switch to use AndroidX.

follow the installationinstructions here and it just will work:
I don't understand. I have B4A installed and working - have been using it for years. You mention AndroidX but a search of the page in the link you sent me does not contain the word "AndroidX". The problem I am having is with only the one lib. Are you suggesting I need to uninstall everything and start over?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I need to uninstall everything and start over?
no need to uninstall anything.
Just setup a new SDK in a new path, configure the new sdk in the IDE. Make sure to have downloaded the SDK per instructions. Two files.

Better directly use the 10.2 Instructions because of the changed SDK ...

 
Upvote 0
Top