Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't run app while setting up Crashlytics - NoClassDefFoundError thrown

I'm trying to add Crashlytics into my Android app, but I can't get to run it because of a NoClassDefFoundError when I press the "Run" button in Eclipse.

I installed ADT version of Eclipse, with the Crashlytics plug-in, and then I run the Crashlytics assistant. When I reached the "Build & run your app to check Crashlytics is fine", I get the following stacktrace:

06-19 00:18:53.647: E/AndroidRuntime(25400): java.lang.NoClassDefFoundError: com.crashlytics.android.Crashlytics
06-19 00:18:53.647: E/AndroidRuntime(25400):    at <app_package>.gui.MainMenuActivity.onCreate(MainMenuActivity.java:24)
06-19 00:18:53.647: E/AndroidRuntime(25400):    at android.app.Activity.performCreate(Activity.java:5206)
06-19 00:18:53.647: E/AndroidRuntime(25400):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1083)
06-19 00:18:53.647: E/AndroidRuntime(25400):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064)
06-19 00:18:53.647: E/AndroidRuntime(25400):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
06-19 00:18:53.647: E/AndroidRuntime(25400):    at android.app.ActivityThread.access$600(ActivityThread.java:140)
06-19 00:18:53.647: E/AndroidRuntime(25400):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
06-19 00:18:53.647: E/AndroidRuntime(25400):    at android.os.Handler.dispatchMessage(Handler.java:99)
06-19 00:18:53.647: E/AndroidRuntime(25400):    at android.os.Looper.loop(Looper.java:137)
06-19 00:18:53.647: E/AndroidRuntime(25400):    at android.app.ActivityThread.main(ActivityThread.java:4898)
06-19 00:18:53.647: E/AndroidRuntime(25400):    at java.lang.reflect.Method.invokeNative(Native Method)
06-19 00:18:53.647: E/AndroidRuntime(25400):    at java.lang.reflect.Method.invoke(Method.java:511)
06-19 00:18:53.647: E/AndroidRuntime(25400):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
06-19 00:18:53.647: E/AndroidRuntime(25400):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
06-19 00:18:53.647: E/AndroidRuntime(25400):    at dalvik.system.NativeStart.main(Native Method)

I've checked the project libraries and crashlytics.jar is there, and it's also in the build path. I also cleaned the project and deleted the bin folder. I haven't found any solution to this problem. I have added Crashlytics to other Android projects and I haven't had any problems, but this one has become a big failure.

Any help would be truly appreciated, I have no clue about what to do... Thanks, kind regards!

like image 942
dinoenri Avatar asked Jun 18 '13 22:06

dinoenri


People also ask

Is Crashlytics deprecated?

Old versions of your app still using the Fabric Crashlytics SDK will not break once it's deprecated, however they will no longer submit crash reports. But it seems like it will just continue to work as per normal after this date until further notice.

Why Crashlytics is integrated with your app?

Firebase Crashlytics helps By Automatically collecting, Analyzing, and Organizing Crash Reports so that we can prioritise Important Issues firstly Keeping our Users happy.


1 Answers

Marc from Crashlytics here. We've had a couple users resolve this issue by exporting the Crashlytics jar in the Eclipse project properties (check the export box in the Properties->Java Build Path->Order and Export screen). Then clean, rebuild, and launch the app. Let me know how it goes!

like image 56
marcr Avatar answered Nov 02 '22 23:11

marcr