I have a project that has been using Crashytics for a while. Today, I added a new build type by copying/pasting one of the existing blocks under buildTypes{...} and renaming it.
The build type includes a different application id suffix, so I logged into the Firebase console, registered a new app using the new application id suffix, and downloaded the generated google-services.json file and placed it in a src folder with the same name as the build type.
Attempts to build the new variant fail with the message:
Execution failed for task ':app:uploadCrashlyticsMappingFileR1Qa'.
java.io.IOException: com.google.firebase.crashlytics.buildtools.exception.CrashlyticsOrgIdException: Could not fetch Crashlytics Org Id
The other variants build without issue. I have tried gradle sync, cleaning and rebuilding, as well as invalidating cache and restarting Android Studio. But the error persists.
I've searched for Crashlytics Org Id, but can find no mention of it in the documentation, or the wider internet, save a couple other SO posts that do not shed much light.
What is Crashlytics Org Id, and from where is it retrieved?
UPDATE: It seems that Google is trying to be a little too automagical here. After adding the google-services.json file to your project, literally need to open up the Crashlytics section of your Firebase console, left-click the next steps (including the step that just opens the documentation) until it says "build and run your app" and do that with the console open. I'm in that habit of right-clicking links and opening them in other tabs/windows and apparently this does not trigger a necessary script on that page.
I got this error when Crashlytics
was not completely configured in Firebase Console
Make sure that you have added your new build type as separate app in console and then go to Crashlytics
section select new app and complete all three steps there.
After this build again, build should succeed.
in my case, I changed the
build.gradle(project)
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0-beta02'
to :
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0'
And then rebuild. The problem solved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With