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

前端 未结 7 1838
温柔的废话
温柔的废话 2021-01-03 18:05

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 =          


        
7条回答
  •  难免孤独
    2021-01-03 18:14

    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

提交回复
热议问题