8

I'm using Android Studio 1.0.1, and have set up Fabric/Crashlytics. The app builds with no errors, but when I Run/Debug, i get the following:

01-23 18:05:00.022  26794-26794/com.myapp.android E/dalvikvm﹕ Could not find class 'com.crashlytics.android.beta.Beta', referenced from method com.crashlytics.android.Crashlytics.<init>
01-23 18:05:00.044  26794-26794/com.myapp.android E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.myapp.android, PID: 26794
java.lang.NoClassDefFoundError: com.crashlytics.android.beta.Beta
        at com.crashlytics.android.Crashlytics.<init>(Crashlytics.java:219)
        at com.crashlytics.android.Crashlytics.<init>(Crashlytics.java:202)
        at com.crashlytics.android.Crashlytics.<init>(Crashlytics.java:197)
        at com.myapp.android.MyApplication.onCreate(MyApplication.java:18)

and so on.

The Fabric plugin for Android Studio made all of the required changes to build.gradle (to grab Crashlytics via maven) and other files (otherwise it wouldn't build!) so I'm at wit's end here. Anybody have an idea what's up?

tobltobs
  • 2,782
  • 1
  • 27
  • 33
c_p
  • 81
  • 3
  • What's on line 18 in your MyApplication class? – joelreeves Jan 24 '15 at 12:47
  • `Fabric.with(this, new Crashlytics());` as shown in the "Fabric with Kits" section in the [SDK docs](https://dev.twitter.com/twitter-kit/android/integrate) – c_p Jan 26 '15 at 02:44
  • Any news on this? I have the same problem but only with my OnePlus and only in debug mode. On the Nexus 10 the same build works fine. – OpenHaus Apr 10 '15 at 09:45
  • @c_p Was wondering if you found solution for same? can you please help me out with same, facing same issue as I updated support libraries :( – Chanchal Shelar Jun 03 '15 at 08:46
  • have you tried this http://stackoverflow.com/a/32097909/2032561 – Bharatesh Mar 10 '16 at 16:38
  • If you have enabled multiDex in your application, you can consider this answer http://stackoverflow.com/a/32097909/1195066 – dayanruben Jul 21 '16 at 00:45

1 Answers1

0

In your manifest add the MultiDexApplication class

<application
    android:name="android.support.multidex.MultiDexApplication">
</application>

Thank you.

Bharat Kumar Emani
  • 3,436
  • 3
  • 16
  • 30