I have been using the latest Crashlytics (Fabric integration) for a while. But recently I encountered the following crash error due to missing dependency although I didn\'t
I had same problem after update plugin. to solve need remove from AndroidManifest.xml:
<meta-data
android:name="com.crashlytics.ApiKey"
android:value="API_SECRET_KEY" />
and add to fabric.properties:
apiSecret=API_SECRET_KEY
apiKey=YOUR_SECRET_KEY
UPDATE:
Now, you have to use:
<meta-data
android:name="io.fabric.ApiKey"
android:value="API_KEY" />
Mike from Crashlytics here. We shipped an updated version - 1.15.2 - earlier today that includes a fix for this behavior. If you run:
./gradlew assemble --refresh-dependencies
that will pull in the latest version. You can also see more details on the fix here.
May be I am late to reply. But this can happen from one more reason apart from all the above answers
If you miss to add
apply plugin:'io.fabric'
This may seem strange but this will result in the same issue
This is by default added by fabric when we sign up and add code from the Fabric window Using IDE but accidentally it can be deleted.
Fix for me From official source
Disable Crashlytics for Debug Builds
If you don’t need Crashlytics crash reporting or beta distribution for debug builds, you can safely speed up your debug-builds by disabling the plugin entirely with these two steps:
First, add this to your app’s build.gradle:
android {
buildTypes {
debug {
// Disable fabric build ID generation for debug builds
ext.enableCrashlytics = false
...
Next, disable the Crashlytics kit at runtime. Otherwise, the Crashlytics kit will throw the following error:
com.crashlytics.android.core.CrashlyticsMissingDependencyException:
This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up`
You can disable the kit at runtime for debug builds only with the following code:
// Set up Crashlytics, disabled for debug builds
Crashlytics crashlyticsKit = new Crashlytics.Builder()
.core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build())
.build();
// Initialize Fabric with the debug-disabled crashlytics.
Fabric.with(this, crashlyticsKit);
<meta-data
android:name="firebase_crashlytics_collection_enabled"
android:value="false" />
Add that to in AndroidManifest.xml
.
I have added the following codes before I actually installed Fabric/Crashlytics:
debug {
ext.enableCrashlytics = false
}
Removing it before the first run with Crashlytics solved the problem. The problem no longer occurs after the first run.