Android Question Barcode with Google Play Vision

benji

Active Member
Licensed User
Hello...
i'm trying this Barcode https://www.b4x.com/android/forum/threads/barcode-reader-based-on-google-play-services-vision.89705/

but, i have this error

Error occurred on line: 49 (Main)
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:131)
at anywheresoftware.b4a.samples.camera.main._createdetector(main.java:462)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.samples.camera.main.afterFirstLayout(main.java:104)
at anywheresoftware.b4a.samples.camera.main.access$000(main.java:17)
at anywheresoftware.b4a.samples.camera.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6934)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/collection/ArrayMap;
at com.google.android.gms.internal.vision.zzaq.<clinit>(com.google.android.gms:play-services-vision-common@@19.0.0:73)
at com.google.android.gms.internal.vision.zzbe.init(com.google.android.gms:play-services-vision-common@@19.0.0:6)
at com.google.android.gms.internal.vision.zzbe.maybeInit(com.google.android.gms:play-services-vision-common@@19.0.0:16)
at com.google.android.gms.internal.vision.zzn.<init>(com.google.android.gms:play-services-vision-common@@19.0.0:12)
at com.google.android.gms.internal.vision.zzh.<init>(com.google.android.gms:play-services-vision@@19.0.0:1)
at com.google.android.gms.vision.barcode.BarcodeDetector$Builder.build(com.google.android.gms:play-services-vision@@19.0.0:7)
... 23 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.collection.ArrayMap" on path: DexPathList[[zip file "/data/app/anywheresoftware.b4a.samples.camera-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
... 29 more
Suppressed: java.lang.ClassNotFoundException: androidx.collection.ArrayMap
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 30 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
** Activity (main) Resume **

i have dependecies and additional jar;

what else?

thanks in advance.
 

benji

Active Member
Licensed User
Hello @Erel updated to B4A v9.5, now i have another error

what i need from sdk?

** Activity (codeview) Resume **
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (codeview) Create, isFirst = true **
Error occurred on line: 58 (CodeView)
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:131)
at avalon.difem.cl.codeview._createdetector(codeview.java:438)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at avalon.difem.cl.codeview.afterFirstLayout(codeview.java:104)
at avalon.difem.cl.codeview.access$000(codeview.java:17)
at avalon.difem.cl.codeview$WaitForLayout.run(codeview.java:82)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6934)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/collection/ArrayMap;
at com.google.android.gms.internal.vision.zzaq.<clinit>(com.google.android.gms:play-services-vision-common@@19.0.0:73)
at com.google.android.gms.internal.vision.zzbe.init(com.google.android.gms:play-services-vision-common@@19.0.0:6)
at com.google.android.gms.internal.vision.zzbe.maybeInit(com.google.android.gms:play-services-vision-common@@19.0.0:16)
at com.google.android.gms.internal.vision.zzn.<init>(com.google.android.gms:play-services-vision-common@@19.0.0:12)
at com.google.android.gms.internal.vision.zzh.<init>(com.google.android.gms:play-services-vision@@19.0.0:1)
at com.google.android.gms.vision.barcode.BarcodeDetector$Builder.build(com.google.android.gms:play-services-vision@@19.0.0:7)
... 23 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.collection.ArrayMap" on path: DexPathList[[zip file "/data/app/avalon.difem.cl-1/base.apk"],nativeLibraryDirectories=[/data/app/avalon.difem.cl-1/lib/arm, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
... 29 more
Suppressed: java.lang.ClassNotFoundException: androidx.collection.ArrayMap
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 30 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
** Activity (codeview) Resume **
 
Upvote 0
Top