How can I fix this CrashlyticsMissingDependencyException?

I have been using the latest Crashlytics (Fabric integration) for a while. But recently I encountered the following crash error due to missing dependency although I didn't change anything about Crashlytics configurations.

any idea?

02-08 22:18:00.935  18887-18887/? E/Fabric﹕ .
02-08 22:18:00.935  18887-18887/? E/Fabric﹕ .     |  |
02-08 22:18:00.935  18887-18887/? E/Fabric﹕ .     |  |
02-08 22:18:00.935  18887-18887/? E/Fabric﹕ .     |  |
02-08 22:18:00.935  18887-18887/? E/Fabric﹕ .   \ |  | /
02-08 22:18:00.935  18887-18887/? E/Fabric﹕ .    \    /
02-08 22:18:00.935  18887-18887/? E/Fabric﹕ .     \  /
02-08 22:18:00.935  18887-18887/? E/Fabric﹕ .      \/
02-08 22:18:00.935  18887-18887/? E/Fabric﹕ .
02-08 22:18:00.935  18887-18887/? E/Fabric﹕ This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,
    install an Android build tool and ask a team member to invite you to this app's organization.
02-08 22:18:00.935  18887-18887/? E/Fabric﹕ .
02-08 22:18:00.935  18887-18887/? E/Fabric﹕ .      /\
02-08 22:18:00.935  18887-18887/? E/Fabric﹕ .     /  \
02-08 22:18:00.935  18887-18887/? E/Fabric﹕ .    /    \
02-08 22:18:00.935  18887-18887/? E/Fabric﹕ .   / |  | \
02-08 22:18:00.935  18887-18887/? E/Fabric﹕ .     |  |
02-08 22:18:00.935  18887-18887/? E/Fabric﹕ .     |  |
02-08 22:18:00.935  18887-18887/? E/Fabric﹕ .     |  |
02-08 22:18:00.935  18887-18887/? E/Fabric﹕ .
02-08 22:18:00.935  18887-18887/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.example.android.staging, PID: 18887
    java.lang.RuntimeException: Unable to create application com.example.android.App: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: com.crashlytics.android.CrashlyticsMissingDependencyException:
    This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,
    install an Android build tool and ask a team member to invite you to this app's organization.
            at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4734)
            at android.app.ActivityThread.access$1600(ActivityThread.java:171)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1357)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:157)
            at android.app.ActivityThread.main(ActivityThread.java:5506)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
            at dalvik.system.NativeStart.main(Native Method)

I have added the following codes before I actually installed Fabric/Crashlytics:

debug {
    ext.enableCrashlytics = false
}

Removing it before the first run with Crashlytics solved the problem. The problem no longer occurs after the first run.


I had this commented out in gradle

apply plugin: 'io.fabric'

needed to uncomment it

Or if you don't have it, add it!


The only workaround for now, if you really need to publish your app (like me), is to change the dynamic version numbers to static ones:

[...]

classpath 'io.fabric.tools:gradle:1.14.4'

[...]

compile('com.crashlytics.sdk.android:crashlytics:2.2.0@aar') {
        transitive = true
}

[...]

EDIT:

an updated version of the Fabric SDK has been published; you can get it by changing the line to this:

classpath 'io.fabric.tools:gradle:1.26.1'

Seems like specifying the plugin version as:

classpath 'io.fabric.tools:gradle:1.+' 

picks up 1.15.1, which has the problem.

Specifying major and minor to previous 1.14 seems to be stable:

classpath 'io.fabric.tools:gradle:1.14.+'

I had same problem after update plugin. to solve need remove from AndroidManifest.xml:

<meta-data
    android:name="com.crashlytics.ApiKey"
    android:value="API_SECRET_KEY" />

and add to fabric.properties:

apiSecret=API_SECRET_KEY
apiKey=YOUR_SECRET_KEY

UPDATE:

Now, you have to use:

  <meta-data
      android:name="io.fabric.ApiKey"
      android:value="API_KEY" />