Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crashlytics error during build - could not read the build_id as a value string

I'm getting the following crashlytics error every time I build any project:

java.io.IOException: Crashlytics could not read the 
com.crashlytics.android.build_id as a value string

Has anyone come across this error? What does it mean, where does it come from and how do you resolve it? It happens during a step called crashlyticsStoreDeobsRelease

Steps I've tried so far to resolve this:

  • reinstalled the crashlytics plugin
  • reinstalled android studio
  • clean the project, invalidate caches and restart
  • forced autoregeneration of the crashlytics-build.properties
  • creating a 'com_crashlytics_export_strings.xml' file in the res/values folder with the build_id (it just vanishes when I build the project)
  • added the apiKey to crashlytics.properties
  • built project with android studio 1.0.1 instead of 1.1 beta 4
  • using version 2.0.1 of crashlytics instead of version 2.2.1
  • removed all aspects of crashlytics and then performed new "onboarding" of the plugin to the app
  • tried disabling all plugins in android studio except for fabric and the base plugins, then restarting and doing a build

EDIT: this definately has something to do with the latest version of Android Studio (V1.1 beta 4) - as it occurs with all projects I'm trying to run under this version

EDIT #2: apparently this doesn't have to do with V1.1 beta 4.. I tried to install the stable build v1.0.1 and it still occurs there :/

Edit #3: I noticed that the files

- crashlytics-build.properties
- crashlytics.properties 
- com_crashlytics_export_strings.xml

are only recreated on android-studio startup. Furthermore, the file com_crashlytics_export_strings.xml is deleted during apk build. Maybe this has something to do with the issue or is it normal behavior?

like image 760
Jon Avatar asked Nov 09 '22 19:11

Jon


1 Answers

Link to the solution:

http://www.reddit.com/r/androiddev/comments/2v0ri1/crashlytics_or_fabric_or_whatever_isnt_working/

Change your classpath to this and it works:

dependencies {
    classpath 'io.fabric.tools:gradle:1.14.4'
}

Apparently the last release that Fabric made (3 days ago) has caused this issue. Their latest release version at this time is 1.15.1

EDIT: Fabric have released version 1.15.2 which doesn't appear to have this problem.

like image 190
Jon Avatar answered Nov 14 '22 22:11

Jon