KotlinJvmAndroidCompilation with name 'debug' not found

Fabric is deprecated use Firebase instead. Refer to this page on how to migrate https://firebase.google.com/docs/crashlytics/get-started?platform=android


I've faced the same issue and it turned out that the cause of the issue is the fabric gradle plugin (crashlytics) rather than gradle itself.

Basically, the issue occurs when setting ext.enableCrashlytics = true in your build.gradle file using io.fabric.tools:gradle:1.31.2 fabric plugin.

Workaround

You have to avoid explicitly setting ext.enableCrashlytics to true (false is okay).

For example, you can replace the following code

def enableCrashlytics = // comes from somewhere
ext.enableCrashlytics = enableCrashlytics

by

def enableCrashlytics = // comes from somewhere
if (!enableCrashlytics) {
    ext.enableCrashlytics = false
}

The behavior remains the same since crashlytics is enabled by default.

As an alternative, you can revert to using 1.31.0 which works fine, but I'd not recommend doing it since the latest version contains a couple of critical bug fixes.

Also, you can consider migrating to Firebase Crashlytics (currently in beta) since Google is dropping support for Fabric soon and this issue might not get fixed.


Remove apply plugin: 'io.fabric' help me, but how return crashlytics...