Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no class found exception #11

Closed
mohsin111 opened this issue Apr 8, 2015 · 5 comments
Closed

no class found exception #11

mohsin111 opened this issue Apr 8, 2015 · 5 comments
Labels

Comments

@mohsin111
Copy link

I have use your library in my project.i have run this project with lolipop version.I used ADT 22.0 version.I have found below error:

04-08 10:30:15.540: E/AndroidRuntime(27571): FATAL EXCEPTION: main
04-08 10:30:15.540: E/AndroidRuntime(27571): Process: com.example.newqrcodereader, PID: 27571
04-08 10:30:15.540: E/AndroidRuntime(27571): java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/zxing/qrcode/QRCodeReader;
04-08 10:30:15.540: E/AndroidRuntime(27571): at com.dlazaro66.qrcodereaderview.QRCodeReaderView.surfaceCreated(QRCodeReaderView.java:125)
04-08 10:30:15.540: E/AndroidRuntime(27571): at android.view.SurfaceView.updateWindow(SurfaceView.java:579)
04-08 10:30:15.540: E/AndroidRuntime(27571): at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:176)
04-08 10:30:15.540: E/AndroidRuntime(27571): at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:847)
04-08 10:30:15.540: E/AndroidRuntime(27571): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1986)
04-08 10:30:15.540: E/AndroidRuntime(27571): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1077)
04-08 10:30:15.540: E/AndroidRuntime(27571): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5884)
04-08 10:30:15.540: E/AndroidRuntime(27571): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
04-08 10:30:15.540: E/AndroidRuntime(27571): at android.view.Choreographer.doCallbacks(Choreographer.java:580)
04-08 10:30:15.540: E/AndroidRuntime(27571): at android.view.Choreographer.doFrame(Choreographer.java:550)
04-08 10:30:15.540: E/AndroidRuntime(27571): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
04-08 10:30:15.540: E/AndroidRuntime(27571): at android.os.Handler.handleCallback(Handler.java:739)
04-08 10:30:15.540: E/AndroidRuntime(27571): at android.os.Handler.dispatchMessage(Handler.java:95)
04-08 10:30:15.540: E/AndroidRuntime(27571): at android.os.Looper.loop(Looper.java:135)
04-08 10:30:15.540: E/AndroidRuntime(27571): at android.app.ActivityThread.main(ActivityThread.java:5312)
04-08 10:30:15.540: E/AndroidRuntime(27571): at java.lang.reflect.Method.invoke(Native Method)
04-08 10:30:15.540: E/AndroidRuntime(27571): at java.lang.reflect.Method.invoke(Method.java:372)
04-08 10:30:15.540: E/AndroidRuntime(27571): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
04-08 10:30:15.540: E/AndroidRuntime(27571): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)
04-08 10:30:15.540: E/AndroidRuntime(27571): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.zxing.qrcode.QRCodeReader" on path: DexPathList[[zip file "/data/app/com.example.newqrcodereader-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
04-08 10:30:15.540: E/AndroidRuntime(27571): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
04-08 10:30:15.540: E/AndroidRuntime(27571): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
04-08 10:30:15.540: E/AndroidRuntime(27571): at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
04-08 10:30:15.540: E/AndroidRuntime(27571): ... 19 more
04-08 10:30:15.540: E/AndroidRuntime(27571): Suppressed: java.lang.ClassNotFoundException: com.google.zxing.qrcode.QRCodeReader
04-08 10:30:15.540: E/AndroidRuntime(27571): at java.lang.Class.classForName(Native Method)
04-08 10:30:15.540: E/AndroidRuntime(27571): at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
04-08 10:30:15.540: E/AndroidRuntime(27571): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
04-08 10:30:15.540: E/AndroidRuntime(27571): at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
04-08 10:30:15.540: E/AndroidRuntime(27571): ... 20 more
04-08 10:30:15.540: E/AndroidRuntime(27571): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

@dlazaro66
Copy link
Owner

It seems it's a problem with libraries linking. Sorry, can you provide more information about how are you integrating this library in your project? Using Android studio and getting the library via Gradle dependency is working for mi with Lollipop devices.

@hjJunior
Copy link

I have the same problem :(

I tried import a lib of zxing but not ressolved
I'm importing on gradle dependencies
compile 'com.dlazaro66.qrcodereaderview:qrcodereaderview:2.0.0@aar'

and
allprojects { repositories { jcenter() } }

@kendrikat
Copy link

Workaround - Add the lib explicitly.

    compile 'com.dlazaro66.qrcodereaderview:qrcodereaderview:2.0.0@aar'
    compile 'com.google.zxing:core:3.2.0'

@dlazaro66 dlazaro66 reopened this Aug 17, 2016
@dlazaro66
Copy link
Owner

dlazaro66 commented Aug 17, 2016

As @kendrikat says, at the moment you can this workaround while I try to fix this

compile 'com.dlazaro66.qrcodereaderview:qrcodereaderview:2.0.0@aar'
compile 'com.google.zxing:core:3.2.0'

@dlazaro66 dlazaro66 added the bug label Aug 17, 2016
@dlazaro66
Copy link
Owner

I think is solved now.
Please check this https://github.com/dlazaro66/QRCodeReaderView#add-it-to-your-project and try that steps, if still not working after that please reopen de issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants