Android Question Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/zxing/Bar

Calvin Yee

Member
Licensed User
When compiling I get the following error. What could be happening?

my project is for QRCodeReaderView and JhsIceZxing1.

please advice.

B4X:
B4A Version: 9.30
Java Version: 8
Parsing code.    (0.00s)
Building folders structure.    (0.01s)
Compiling code.    (0.02s)
Compiling layouts code.    (0.00s)
Organizing libraries.    (0.00s)
    (Android Support Library)
Generating R file.    (0.04s)
Compiling generated Java code.    (1.18s)
Convert byte code - optimized dex.    Error
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/zxing/BarcodeFormat;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/zxing/Binarizer;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/zxing/BinaryBitmap;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/zxing/ChecksumException;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/zxing/DecodeHintType;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/zxing/Dimension;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/zxing/EncodeHintType;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/zxing/FormatException;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/zxing/InvertedLuminanceSource;
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
 

Attachments

  • b4aQRCodeReaderView.zip
    168.5 KB · Views: 315

Johan Schoeman

Expert
Licensed User
Longtime User
When compiling I get the following error. What could be happening?

my project is for QRCodeReaderView and JhsIceZxing1.

please advice.

B4X:
B4A Version: 9.30
Java Version: 8
Parsing code.    (0.00s)
Building folders structure.    (0.01s)
Compiling code.    (0.02s)
Compiling layouts code.    (0.00s)
Organizing libraries.    (0.00s)
    (Android Support Library)
Generating R file.    (0.04s)
Compiling generated Java code.    (1.18s)
Convert byte code - optimized dex.    Error
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/zxing/BarcodeFormat;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/zxing/Binarizer;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/zxing/BinaryBitmap;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/zxing/ChecksumException;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/zxing/DecodeHintType;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/zxing/Dimension;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/zxing/EncodeHintType;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/zxing/FormatException;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/zxing/InvertedLuminanceSource;
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
QRCodeReaderView has it own b4A library files (jar, XML). Use the library files that goes with it and select the correct library in the B4A IDE. JhsIceZxing1 should not be selected in the IDE.
 
Upvote 0

Calvin Yee

Member
Licensed User
Hi,


My project will use JhsIceZxing1 and QRCodeReader.

I will use JhsIceZxing1 also. because JhsIceZxing1 is allow to scan barcode and qrcode.

QRCodeReade only read QRCode scan.

I need 2 library file in project.
 
Upvote 0

Calvin Yee

Member
Licensed User
I try to delete as per mention, error popup access is denied.
 

Attachments

  • delete access denied.PNG
    delete access denied.PNG
    23.7 KB · Views: 314
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
The problem is that you copied additional libraries to the internal library folder which is a mistake. You do not have write permissions in this folder.
Never copy additional libraries into the internal library folder.

Configure a additional library folder in the ide, copy all additional libraries into this folder.
 
Upvote 0
Top