Crashlytics error - This app relies on Crashlytics. Please sign up for access

Addition to answer of Todd Burner

Be carefull with BuildConfig.DEBUG. IDE can auto-import it from

com.crashlytics.android.BuildConfig (= false)

instead of your app config

${app_package}.BuildConfig

UPDATE

Providing an example on the request of j2emanue

    ...
    import com.fiot.ot.BuildConfig             <- should be
    import com.crashlytics.android.BuildConfig <- my IDE automatically imported 

    fun initFabric(context: Context) {
        val core = CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()
        val kit = Crashlytics.Builder().core(core).build()
        Fabric.with(context, kit)
    }

Where com.fiot.ot package name of my app


Whenever I set

ext.enableCrashlytics = false

my app crashes with

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.

What seems to work for me is that I have to disable automatic initialization of Crashlytics by adding this line to AndroidManifest.xml

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

Then I manually initialize Crashlytics in the onCreate() method of my Application subclass, use BuildConfig.DEBUG to decide whether to disable CrashlyticsCore, and call Fabric.with(). In fact, I no longer set

ext.enableCrashlytics = false

at all. It all seems to work to me.


Todd from Fabric. You will get this error unless you also disable Fabric at run time.

    // 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);

Check out this link for more details: https://docs.fabric.io/android/crashlytics/build-tools.html#disable-crashlytics-for-debug-builds


Maybe missing apply plugin fabric

I added this line on top of file app/build.gradle resolved my issues!

apply plugin: 'io.fabric'