Crashlytics error - This app relies on Crashlytics. Please sign up for access
Maybe missing apply plugin fabric
I added this line on top of file app/build.gradle
resolved my issues!
apply plugin: 'io.fabric'
Whenever I set
ext.enableCrashlytics = false
my app crashes with
io.fabric.sdk.android.services.concurrency.UnmetDependencyExceptionThis 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.
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