Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

crashlytics developer tools error when building android -gradle project

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.+'         } 
like image 843
user2469133 Avatar asked Jul 31 '14 13:07

user2469133


People also ask

Is Crashlytics deprecated?

Old versions of your app still using the Fabric Crashlytics SDK will not break once it's deprecated, however they will no longer submit crash reports. But it seems like it will just continue to work as per normal after this date until further notice.

How do I stop Crashlytics on Android?

Here's a couple of ways to disable Crashlytics while you are doing your debug builds! Use a different android:versionString for debug and release builds and then disable crash reporting from the Crashlytics web dashboard for the debug version. Wrap the call to Crashlytics.


2 Answers

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

like image 133
Antonio Jose Avatar answered Oct 05 '22 19:10

Antonio Jose


This is not a solution to the original question, but you can also run into this error another way. If you are following docs for the Gradle Advanced Setup you might have included the following code

debug {     ext.enableCrashlytics = false } 

Now if you are testing your application you may have tried to set ext.enableCrashlytics = true instead. Apparently this will cause errors for Crashlytics though and is not a valid value for this variable.

So if you want Crashlytics enabled for debug builds you'll need to comment out this line while you are testing or remove it altogether.

like image 22
Andrea Thacker Avatar answered Oct 05 '22 17:10

Andrea Thacker