Android Question Compilation error after adding NewQRCodeReader

uniplan

Active Member
Licensed User
Longtime User
Hi, i have importaed this libray
https://www.b4x.com/android/forum/threads/qrcodereaderview-new-release.82265/
but in compilation have this 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:689)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:313)
at com.android.dx.command.dexer.Main.run(Main.java:279)
at com.android.dx.command.dexer.Main.main(Main.java:247)
at com.android.dx.command.Main.main(Main.java:106)
Caused by: java.lang.InterruptedException: Too many errors
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:681)
... 4 more


How i can solve it?
Thank you
 

DonManfred

Expert
Licensed User
Longtime User
My guess:

Remove this line from the library XML file...

<dependsOn>android-support-annotations</depends
 
Upvote 0

uniplan

Active Member
Licensed User
Longtime User
ok....solve my problem in compilation, but i have this error when i using the object...

java.lang.NullPointerException: Attempt to invoke virtual method 'void com.dlazaro66.qrcodereaderview.QRCodeReaderView.setQRDecodingEnabled(boolean)' on a null object reference
at newqrcodereaderviewwrapper.newqrcodereaderviewWrapper.setQRDecodingEnabled(newqrcodereaderviewWrapper.java:105)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:755)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:345)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
at b4a.example.frmcontrolboard.afterFirstLayout(frmcontrolboard.java:102)
at b4a.example.frmcontrolboard.access$000(frmcontrolboard.java:17)
at b4a.example.frmcontrolboard$WaitForLayout.run(frmcontrolboard.java:80)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

this is the line:
nqrcrv.QRDecodingEnabled = True
(first line where i using the NewQRCodeReaderView object)
 
Upvote 0
Top