Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 = false 

the error itself complete is below:

Process: com.mobile.myapp.staging, PID: 5439 java.lang.RuntimeException: Unable to create application com.mobile.myapp.UI.myappApplication: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: This 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. at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4710) at android.app.ActivityThread.-wrap1(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) Caused by: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: This 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. at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:234) at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:207) at io.fabric.sdk.android.InitializationTask.onPreExecute(InitializationTask.java:44) at io.fabric.sdk.android.services.concurrency.AsyncTask.executeOnExecutor(AsyncTask.java:611) at io.fabric.sdk.android.services.concurrency.PriorityAsyncTask.executeOnExecutor(PriorityAsyncTask.java:43) at io.fabric.sdk.android.Kit.initialize(Kit.java:69) at io.fabric.sdk.android.Fabric.initializeKits(Fabric.java:440) at io.fabric.sdk.android.Fabric.init(Fabric.java:384) at io.fabric.sdk.android.Fabric.setFabric(Fabric.java:342) at io.fabric.sdk.android.Fabric.with(Fabric.java:313) at com.mobile.myapp.UI.base.BaseApplication.setupExceptionHandling(BaseApplication.java:51) at com.mobile.myapp.UI.myappApplication.onCreate(myappApplication.java:45) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4707) 

And this is how I initialize crashlytics in my Application subclass:

Fabric.with(this, new Crashlytics()); 

what i am trying to do is have control over whether or not a crashlytics can run or not per flavor. lets say i want flavor1 not to run crashlytics i thought i could use that gradle flag and set it to false. am i missing something ?

like image 377
j2emanue Avatar asked Aug 23 '17 11:08

j2emanue


People also ask

What is the use of Crashlytics in Android?

Crashlytics saves you troubleshooting time by intelligently grouping crashes and highlighting the circumstances that lead up to them. Find out if a particular crash is impacting a lot of users. Get alerts when an issue suddenly increases in severity. Figure out which lines of code are causing crashes.

Is Crashlytics deprecated?

Old versions of your app still using the Fabric Crashlytics SDK will not break once it's deprecated, however they will no longer submit crash reports. But it seems like it will just continue to work as per normal after this date until further notice.


2 Answers

Maybe missing apply plugin fabric

I added this line on top of file app/build.gradle resolved my issues!

apply plugin: 'io.fabric'

like image 174
DaoLQ Avatar answered Sep 21 '22 07:09

DaoLQ


Whenever I set

ext.enableCrashlytics = false 

my app crashes with

io.fabric.sdk.android.services.concurrency.UnmetDependencyException  This 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.

like image 42
KGBird Avatar answered Sep 19 '22 07:09

KGBird