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

3

22

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.

Tectrix answered 2/3, 2015 at 9:22 Comment(2)
I've got the same problem, please see my solution: #28891825Trying
#28256257 this solution solved my problemTest
R
15

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.

Rarotonga answered 19/7, 2016 at 10:27 Comment(1)
But this solution is before Fabric had been bought by Google(Firebase).Secondbest
B
8

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.

Berth answered 3/12, 2015 at 17:38 Comment(0)
K
4

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" />
Kileykilgore answered 7/8, 2017 at 16:36 Comment(2)
This is the way Fabric sets your app up by default, but this way is insecure. Someone could decompile your application and see they API key. It is better to have it stored in the gradle.properties file but fabric is giving me this same error when attempting to store it in this manner.Novobiocin
Hmm could something like ProGuard be a temporary solution? Source: https://mcmap.net/q/56108/-best-practice-for-storing-and-protecting-private-api-keys-in-applications-closedKileykilgore

© 2022 - 2024 — McMap. All rights reserved.