android – Error:Execution failed for task ':app:fabricGenerateResourcesDebug'. > Crashlytics Developer Tools error-ThrowExceptions

Exception or error:

Trying to add Twitter Fabric SDK. I have added all dependencies suggested by Twitter.

Modified my build.gradle:

buildscript {
    repositories {
        jcenter()
        maven { url 'https://maven.fabric.io/repo' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.13.3'
        // The Fabric Gradle plugin uses an open ended version to
        // react quickly to Android tooling updates
       classpath 'io.fabric.tools:gradle:1.+'
    }
}

apply plugin: 'com.android.application'

//Put Fabric plugin after Android plugin
apply plugin: 'io.fabric'

repositories {
    jcenter()
    maven { url 'https://maven.fabric.io/repo' }
}

When tries to synch got this error:

Error:Execution failed for task
    ':app:fabricGenerateResourcesDebug'. > Crashlytics Developer Tools error.

While project was build successful before modifying build.gradle file for Twitter SDK.

How to solve:

You need to add your API Key to the Android Manifest:

<application>
    <meta-data
        android:name="com.crashlytics.ApiKey"
        android:value="your key here" />
</application>

Same solution is provided here.

###

Try the next solution:

  1. Open your fabric plug-in and then open Crashlytics
  2. If you don’t have install Crashlytics install it. This will modify and sync your build.gradle

I did this and it worked for me. Hope it work for you.

###

I got this error after linking my fabric API key to a string resource like so:

<meta-data
    android:name="io.fabric.ApiKey"
    android:value="@string/fabric_api_key" />

Solved it by putting the API key as a string literal in the value attribute:

<meta-data
    android:name="io.fabric.ApiKey"
    android:value="123905329fakekey023904909423" />

Leave a Reply

Your email address will not be published. Required fields are marked *