I have two build flavors in gradle but for some reason whenever i change the following flag to false i get the titled error message:
ext.enableCrashlytics =
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