I\'ve been having an issue and I don\'t know how to fix it.
My project use crashlytics, but it\'s always crash and not sent report. I have a TimeoutException:
<Check Your AndroidManifest.xml file, it contain any provider duplicate or written more than two time that sit.
Because, This issue is occurred some device specific, before some time I Faced some issue and this is my final solution.
According to Crashlytics support guide :
Make sure our SDK line is after all other 3rd-party SDKs
So try to set Fabric.with(this, new Crashlytics());
after all of your other sdk related initialization if any.
If no other sdk initialization there then try to set it after your BuildConfig initialization.
public class MyApplication extends MultiDexApplication {
@Override
public void onCreate() {
super.onCreate();
if (!BuildConfig.DEBUG) {
Log.d("Ez", "Release mode. Crashlytics enable");
//Fabric.with(this, new Crashlytics());
} else {
Log.d("Ez", "Debug mode. Crashlytics disable");
}
Fabric.with(this, new Crashlytics());
throw new RuntimeException("This is a crash");
}
}
In my case, I had some entries in AndroidManifest.xml that were not valid anymore. Java runtime couldn't find them, which caused the crash.
To be more precise, I was using a Facebook plugin that I removed but left some config entries in AndroiManifest.xml. After I removed them this error disappeared.
In your case, it could be something else in the AndroidManifest.
This is one of the possible causes. Each App is different.
This issue drove me crazy still in 2019, but I think I finally figured out, what did the exception cause.
I followed all the setup instructions given in the official firebase documentation, but when I tested my solution I didn't get any report on Firebase Crashlytics admin, because of the TimeoutException.
The reason was in my case, that I triggered the Exception in my main activity's onCreate() or onResume() methods. When I let my app at the first start just run without exception, then later I started to get the reports without any error, so I think it's important, that at the first start the app shouldn't throw any exception in the hook methods.
Hope my experience helped.
My solution is next:
Application::onCreate
method you probably won't see any reporting in Firebase console.How I test that:
Application::onCreate
methodHope it also helps you!
For anyone still struggling with this, I solved it by installing android studio fabric plugin directly via Settings->Plugins android studio and let the plugin edit my code in gradle. You can see it done here : https://www.youtube.com/watch?v=Qvqr6vGzxIs