crashlytics developer tools error when building android -gradle project

user2469133 picture user2469133 · Jul 31, 2014 · Viewed 32.2k times · Source

I'm trying to build an android gradle project using eclipse, but i get this error when building the project using the command line:

 FAILURE: Build failed with an exception.

 * What went wrong:
 Execution failed for task ':app:crashlyticsCleanupResourcesRelease'.
 > Crashlytics Developer Tools error.

 * Try:
 Run with --stacktrace option to get the stack trace. Run with --info or --debug
 option to get more log output.

 BUILD FAILED

I'm using gradle version 1.10 also tried gradle version 1.12 but i get the same error

and here is my build.gradle file :

        buildscript {
            repositories {
                mavenCentral()
                maven { url 'http://download.crashlytics.com/maven' }
            }
            dependencies {
                classpath 'com.android.tools.build:gradle:0.12.+'
                classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
                classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.10.+'
            }
        }
        apply plugin: 'android-sdk-manager'
        apply plugin: 'android'
        apply plugin: 'crashlytics'

        repositories {
            mavenCentral()
            maven { url 'http://download.crashlytics.com/maven' }
        }

        android {
            compileSdkVersion 19
            buildToolsVersion "19.1.0"
            lintOptions.checkReleaseBuilds false

            defaultConfig {
                minSdkVersion 7
                targetSdkVersion 19
            }

            signingConfigs {
                release {
                    storeFile file(STORE_FILE)
                    storePassword STORE_PASSWORD
                    keyAlias KEY_ALIAS
                    keyPassword KEY_PASSWORD
                }
            }

            buildTypes {
              debug {

               ext.enableCrashlytics = false
               buildConfigField "boolean", "LOG_CRASHES", "false"
              }

              release {
                 buildConfigField "boolean", "LOG_CRASHES", "true"
                 runProguard true
                 proguardFile 'proguard.cfg'
                 signingConfig signingConfigs.release
              }
            }
        }

        dependencies {
            compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
            compile 'com.android.support:support-v4:19.1.0'
            compile 'com.crashlytics.android:crashlytics:1.+'
        }

Answer

Antonio Jose picture Antonio Jose · Dec 15, 2014

Had a similar error trying to use Fabric's Twitter Kit

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

Detailed error

ERROR - Crashlytics Developer Tools error. java.lang.IllegalArgumentException: Crashlytics found an invalid API key: XXXXXXXXX. Check the Crashlytics plugin to make sure that the application has been added successfully! Contact [email protected] for assistance.

After login in Fabric, download the AndroidStudio plugin and let it configure everything all worked fine.

(Btw, I really don't like this setup flow)

EDIT: It also can be done without install the AndroidStudio plugin. Follow these instructions from the Fabric site https://fabric.io/downloads/gradle