You are referencing the Class com.google.zxing. ResultMetadataType in CaptureActivity. Java on line 94 but the definition for this Class cannot be found (ClassDefNotFound).
If it cannot be found then it must not be on your class path.
Up vote 0 down vote favorite share g+ share fb share tw.
How to solve this NoClassDefFoundError. I have integrated Zxing in my app, every thing is working fine. Then I have updated my sdk and eclipse plugin, and when I run the project the log says 03-27 17:27:45.173: E/AndroidRuntime(8917): FATAL EXCEPTION: main 03-27 17:27:45.173: E/AndroidRuntime(8917): java.lang.
ExceptionInInitializerError 03-27 17:27:45.173: E/AndroidRuntime(8917): at java.lang.Class. NewInstanceImpl(Native Method) 03-27 17:27:45.173: E/AndroidRuntime(8917): at java.lang.Class. NewInstance(Class.
Java:1429) 03-27 17:27:45.173: E/AndroidRuntime(8917): at android.app.Instrumentation. NewActivity(Instrumentation. Java:1021) 03-27 17:27:45.173: E/AndroidRuntime(8917): at android.app.ActivityThread.
PerformLaunchActivity(ActivityThread. Java:2577) 03-27 17:27:45.173: E/AndroidRuntime(8917): at android.app.ActivityThread. HandleLaunchActivity(ActivityThread.
Java:2679) 03-27 17:27:45.173: E/AndroidRuntime(8917): at android.app.ActivityThread. Access$2300(ActivityThread. Java:125) 03-27 17:27:45.173: E/AndroidRuntime(8917): at android.app.
ActivityThread$H. HandleMessage(ActivityThread. Java:2033) 03-27 17:27:45.173: E/AndroidRuntime(8917): at android.os.Handler.
DispatchMessage(Handler. Java:99) 03-27 17:27:45.173: E/AndroidRuntime(8917): at android.os.Looper. Loop(Looper.
Java:123) 03-27 17:27:45.173: E/AndroidRuntime(8917): at android.app.ActivityThread. Main(ActivityThread. Java:4627) 03-27 17:27:45.173: E/AndroidRuntime(8917): at java.lang.reflect.Method.
InvokeNative(Native Method) 03-27 17:27:45.173: E/AndroidRuntime(8917): at java.lang.reflect.Method. Invoke(Method. Java:521) 03-27 17:27:45.173: E/AndroidRuntime(8917): at com.android.internal.os.
ZygoteInit$MethodAndArgsCaller. Run(ZygoteInit. Java:868) 03-27 17:27:45.173: E/AndroidRuntime(8917): at com.android.internal.os.ZygoteInit.
Main(ZygoteInit. Java:626) 03-27 17:27:45.173: E/AndroidRuntime(8917): at dalvik.system.NativeStart. Main(Native Method) 03-27 17:27:45.173: E/AndroidRuntime(8917): Caused by: java.lang.
NoClassDefFoundError: com.google.zxing. ResultMetadataType 03-27 17:27:45.173: E/AndroidRuntime(8917): at records.model.CaptureActivity.(CaptureActivity. Java:94)` android eclipse zxing link|improve this question edited 03-27 at 3:47 asked 03-27 at 12:43Kishore156116 84% accept rate.
You are referencing the Class com.google.zxing. ResultMetadataType in CaptureActivity. Java on line 94 but the definition for this Class cannot be found (ClassDefNotFound).
If it cannot be found then it must not be on your class path. There is probably a . Jar file somewhere on your disk that contains com.google.zxing.
ResultMetadataType (seemingly core. Jar) place this on your project's class path to resolve this issue.
I have core. Jar added in assets folder and configured – Kishore Mar 27 at 13:00 Can you confirm that this is the appropriate core. Jar?
If you open it as a zip file can you locate com.google.zxing. ResultMetadataType? – Andrew Mar 27 at 13:17 yes if I open there is com.google.zxing.
ResultMetadataType. Class file – Kishore Mar 27 at 13:26 1 Ah, have you followed the steps described here: stackoverflow.com/a/2248017/180295 (specifically 3rd and 4th) – Andrew Mar 27 at 13:28.
It means exactly what it says. You are using library code that you did not actually include into your app. Make sure the the contents of core.
Jar from the project are part of your project, as a library project.
I have core. Jar added in assets folder and configured it like this BuilPath-->config build-->Add jars – Kishore Mar 27 at 12:56 Sure, but you have not set it up to actually include the classes in the app! – Sean Owen Mar 27 at 13:18.
I had the same thing happen to me with a different . Jar also after upgrading SDK and plugin. Andrews answer below with link stackoverflow.com/a/2248017/180295 with points 3 and 4 worked for me.
For some reason, ADT is no longer including libraries from your build path in the generated . Apk file. To fix, create a "libs" folder in the root of your project (ie: bin, src, assets, libs) and put the core.
Jar file in there. Remove all other instances from your build path, and everything should work fine. NoClassDefFoundError - Eclipse and Android.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.