need help,exception about barcodescanner

2 posts, 0 answers
  1. Mr
    Mr avatar
    1 posts
    Member since:
    Jul 2016

    Posted 27 Jul Link to this post

    Hi,everyone,first of all,i'm sorry for my bad english.here's the issue.

    I create a android project by cordova and add barcodescanner plugin https://github.com/Telerik-Verified-Plugins/BarcodeScanner.git.but when I invoke the scan method,the app forced close and get exception like this:

    07-27 16:38:35.302  16200-16200/com.example.testScan E/AndroidRuntime﹕ FATAL EXCEPTION: main
        Process: com.example.testScan, PID: 16200
        java.lang.NoClassDefFoundError: Failed resolution of: Lbarcodescanner/xservices/nl/barcodescanner/R$layout;
                at com.google.zxing.client.android.CaptureActivity.onCreate(CaptureActivity.java:142)
                at android.app.Activity.performCreate(Activity.java:6107)
                at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
                at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2594)
                at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2710)
                at android.app.ActivityThread.access$800(ActivityThread.java:179)
                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1561)
                at android.os.Handler.dispatchMessage(Handler.java:111)
                at android.os.Looper.loop(Looper.java:194)
                at android.app.ActivityThread.main(ActivityThread.java:5803)
                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:1009)
                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:804)
         Caused by: java.lang.ClassNotFoundException: Didn't find class "barcodescanner.xservices.nl.barcodescanner.R$layout" on path: DexPathList[[zip file "/data/app/com.example.testScan-2/base.apk"],nativeLibraryDirectories=[/data/app/com.example.testScan-2/lib/arm64, /vendor/lib64, /system/lib64]]
                at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
                at com.google.zxing.client.android.CaptureActivity.onCreate(CaptureActivity.java:142)
                at android.app.Activity.performCreate(Activity.java:6107)
                at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
                at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2594)
                at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2710)
                at android.app.ActivityThread.access$800(ActivityThread.java:179)
                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1561)
                at android.os.Handler.dispatchMessage(Handler.java:111)
                at android.os.Looper.loop(Looper.java:194)
                at android.app.ActivityThread.main(ActivityThread.java:5803)
                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:1009)
                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:804)
        Suppressed: java.lang.ClassNotFoundException: barcodescanner.xservices.nl.barcodescanner.R$layout
                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)
                ... 15 more
         Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

    have anyone know what's wrong about this? and what should i do to fix it?

  2. Garo
    Admin
    Garo avatar
    46 posts

    Posted 01 Aug Link to this post

    Hello,

    I was unable to reproduce the faulty behavior that you are experiencing.

    That being said, could you verify if you are including the Barcode Scanner plugin in your app following our documentation?

    Additionally, if the plugin is added as shown in our documentation and the issue is still present, I would ask you to provide us with your app or a sample that recreates this problem.

    Regards,
    Garo
    Telerik by Progress
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
Back to Top