18

After implementation 'com.google.firebase:firebase-core:16.0.1' and classpath 'com.google.gms:google-services:4.0.1'

I started getting the following error when starting the application:

FATAL EXCEPTION: main Process: com.fentury.android, PID: 10771 java.lang.RuntimeException: Unable to get provider com.crashlytics.android.CrashlyticsInitProvider: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: 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.installProvider(ActivityThread.java:5856) at android.app.ActivityThread.installContentProviders(ActivityThread.java:5445) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5384) at android.app.ActivityThread.-wrap2(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1545) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) Caused by: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: 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 com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:235) at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:209) at io.fabric.sdk.android.InitializationTask.onPreExecute(InitializationTask.java:44) at io.fabric.sdk.android.services.concurrency.AsyncTask.executeOnExecutor(AsyncTask.java:611) at io.fabric.sdk.android.services.concurrency.PriorityAsyncTask.executeOnExecutor(PriorityAsyncTask.java:43) at io.fabric.sdk.android.Kit.initialize(Kit.java:69) at io.fabric.sdk.android.Fabric.initializeKits(Fabric.java:440) at io.fabric.sdk.android.Fabric.init(Fabric.java:384) at io.fabric.sdk.android.Fabric.setFabric(Fabric.java:342) at io.fabric.sdk.android.Fabric.with(Fabric.java:313) at com.crashlytics.android.CrashlyticsInitProvider.onCreate(CrashlyticsInitProvider.java:27) at android.content.ContentProvider.attachInfo(ContentProvider.java:1751) at android.content.ContentProvider.attachInfo(ContentProvider.java:1726) at android.app.ActivityThread.installProvider(ActivityThread.java:5853) ... 10 more

Also added in AndroidManifest.xml next line:

<meta-data android:name="firebase_crash_collection_enabled" android:value="false" />
9
  • 1
    As mentioned in the error message, the app uses Crashlytics. You might want to set it up Commented Jul 25, 2018 at 16:00
  • 1
    @RosárioPereiraFernandes Doesn't help, same error :( Commented Jul 26, 2018 at 13:39
  • Have you added the crashlytics dependency to your build.gradle @ Morozov? Commented Jul 30, 2018 at 8:50
  • @A.N.T yep, implementation('com.crashlytics.sdk.android:crashlytics:2.9.3@aar') { transitive = true and before the firebase implementation of all worked perfectly Commented Jul 30, 2018 at 12:35
  • Have you added fabric meta-data in your manifest @ Morozov ? Commented Jul 30, 2018 at 12:51

5 Answers 5

17

This helped to solve my problem

<meta-data
            android:name="firebase_crashlytics_collection_enabled"
            android:value="false" />

And remove this:

<meta-data android:name="firebase_crash_collection_enabled" android:value="false" />
Sign up to request clarification or add additional context in comments.

3 Comments

Wouldn't this disable crash reporting?
@algrid nope. Try it.Then u can try to create an error artificially.
no help for me. Crashes number increased after I change crashlytics from version 2.9.4 to 2.9.5. Now I use 2.10.0 and ndk:2.1.0, many crashes still appears.
15

I found that the only thing you need to do after following the instruction on the Firebase Crashlytics docs is to apply the fabric plugin in your app build file (This step is actually missing from the docs!).

In your app-level build.gradle add the following

// Apply the Fabric plugin
apply plugin: 'io.fabric'

Edit: It appears that this step has been recently added to the docs (See Step 2 / part 2).

2 Comments

This needs more emphasis. It is actually in the docs now (See Step 2 / part 2) yet I totally missed it until I saw this comment.
@ralfoide You are correct it needs more emphasis indeed. I believe this was recently added to the docs as it was not there when I last checked.
3

If you are going to use other Firebase's API's, I'd suggest to setup crashlytics
As mentioned on Firebase's crashlytics page, here.

And obviously before that you'd need to setup firebase for your app
and create project through firebase console.
I believe you had already done that.

It's because I see small difference in crashlytics setup on these two pages(fabric and firebase).
like on firebase's crashlytics:
in app level gradle

dependencies {
    // ...
    implementation 'com.crashlytics.sdk.android:crashlytics:2.9.3'
}

on fabric:

dependencies {
    // ...
      implementation('com.crashlytics.sdk.android:crashlytics:2.9.4@aar') {
    transitive = true;
  }
}

You won't need to add fabric api key through manifest if you are using with firebase, I think it somehow get connected with firebase key(just guessing).
I'm saying this from my experience, anyone correct me if I'm somewhere wrong.

Comments

2

I ran into this issue as well it was caused by using the incorrect Fabric.with() initializer for debug builds.

Don’t use:

// Set up Crashlytics, disabled for debug builds
Crashlytics crashlyticsKit = new Crashlytics.Builder()
        .core(new CrashlyticsCore.Builder()
                .disabled(BuildConfig.DEBUG)
                .build())
        .build();

// Initialize Fabric with the debug-disabled Crashlytics
Fabric.with(this, crashlyticsKit, new Crashlytics()); // WRONG!

Instead use:

// Set up Crashlytics, disabled for debug builds
Crashlytics crashlyticsKit = new Crashlytics.Builder()
        .core(new CrashlyticsCore.Builder()
                .disabled(BuildConfig.DEBUG)
                .build())
        .build();

// Initialize Fabric with the debug-disabled Crashlytics
Fabric.with(this, crashlyticsKit); // Correct initializer!

Documentation: https://docs.fabric.io/android/crashlytics/build-tools.html#disable-crashlytics-for-debug-builds

Comments

0

In my case I was building app for android 4.4 compatibility which does not have build in Multidex support. I solved the problem by following steps bellow to enable Multidex for android 4.4 and the problem went away:
Enable multidex for apps with over 64K methods

David

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.