Skip to content
This repository has been archived by the owner on Mar 6, 2018. It is now read-only.

Fatal Exception ClassDefNot found when running on Android Emulator #55

Open
ChrisFrancis opened this issue May 26, 2013 · 3 comments
Open

Comments

@ChrisFrancis
Copy link

Emulator ICS 4.0

I added the socketio jar to the build path and it does not throw any error during compile time . But on run time it throws an error . I am using the same jar in my java standalone and it works completly fine . I find it only when i am doing the android client .

Another user also faces the same issue here is the link to his stack overflow question .

Below is the logs . Thank you .

05-26 14:54:03.778: E/AndroidRuntime(1418): FATAL EXCEPTION: main
05-26 14:54:03.778: E/AndroidRuntime(1418): java.lang.NoClassDefFoundError: io.socket.SocketIO
05-26 14:54:03.778: E/AndroidRuntime(1418): at com.presentationclient.Activities.Presenter.test(Presenter.java:95)
05-26 14:54:03.778: E/AndroidRuntime(1418): at com.presentationclient.Activities.Presenter.initializeViewElements(Presenter.java:52)
05-26 14:54:03.778: E/AndroidRuntime(1418): at com.presentationclient.Activities.Presenter.onCreate(Presenter.java:43)
05-26 14:54:03.778: E/AndroidRuntime(1418): at android.app.Activity.performCreate(Activity.java:4465)
05-26 14:54:03.778: E/AndroidRuntime(1418): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
05-26 14:54:03.778: E/AndroidRuntime(1418): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
05-26 14:54:03.778: E/AndroidRuntime(1418): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
05-26 14:54:03.778: E/AndroidRuntime(1418): at android.app.ActivityThread.access$600(ActivityThread.java:123)
05-26 14:54:03.778: E/AndroidRuntime(1418): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
05-26 14:54:03.778: E/AndroidRuntime(1418): at android.os.Handler.dispatchMessage(Handler.java:99)
05-26 14:54:03.778: E/AndroidRuntime(1418): at android.os.Looper.loop(Looper.java:137)
05-26 14:54:03.778: E/AndroidRuntime(1418): at android.app.ActivityThread.main(ActivityThread.java:4424)
05-26 14:54:03.778: E/AndroidRuntime(1418): at java.lang.reflect.Method.invokeNative(Native Method)
05-26 14:54:03.778: E/AndroidRuntime(1418): at java.lang.reflect.Method.invoke(Method.java:511)
05-26 14:54:03.778: E/AndroidRuntime(1418): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-26 14:54:03.778: E/AndroidRuntime(1418): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-26 14:54:03.778: E/AndroidRuntime(1418): at dalvik.system.NativeStart.main(Native Method)

@u3amar
Copy link

u3amar commented Jul 26, 2013

I had a similar issue. Right click your project, go to build path, configure build path, and go to the order / export tab. There, make sure 'socket.io.jar' is checked for export. Click ok and build / run your project again.

@lalith-b
Copy link

lalith-b commented Aug 1, 2013

The problem of NoClassDefFoundError is due to the IDE not referencing the Classes in the JAR, I suggest you add the project as a module dependancy incase of gradle build system or use the exported jar as u3amar stated to solve the problem

@Will5
Copy link

Will5 commented Sep 27, 2013

I followed u3amars suggestion, but I still get a NoClassDefFoundError

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

No branches or pull requests

4 participants