Can't disable Crashlytics in a Firebase app (anymore)

戏子无情 提交于 2019-12-03 01:56:31

Mike from Fabric here. Use:

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

if you want to disable Crashlytics while using Firebase.

according to mike answer, im add my code:

Gradle:

buildTypes {
   release {
        manifestPlaceholders = [crashlyticsEnabled: true]
    }

    debug {
        manifestPlaceholders = [crashlyticsEnabled: false]
    }
}

Manifest.xml:

<meta-data
    android:name="firebase_crashlytics_collection_enabled"
    android:value="${crashlyticsEnabled}" />

Along with mikes above answer,

If you are setting firebase crash properties somewhere in your code, make sure that you don't set them for debug code, otherwise you might notice strange behaviour for the app.

   if (!BuildConfig.DEBUG) {
       Crashlytics.setUserIdentifier(DataStore.storeId)
   }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!