Reputation: 2727
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.
Upvotes: 5
Views: 2834
Reputation: 1009
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.
Upvotes: 3
Reputation: 149
Actually, there was a problem with the Gradle proxy settings for me (which happened when I installed the Android Studio 4). Refer to this answer: https://stackoverflow.com/a/59948613/6140436
Upvotes: 0
Reputation: 465
just remove
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0-beta02'
and
apply plugin: 'com.google.firebase.crashlytics'
build and enjoy
Upvotes: 0
Reputation: 319
Make sure that you have added your app in the firebase project settings with the correct package name and that you have downloaded the google-services.json
file and put it into the app.
Project Overview
you can navigate to the Project settings
.Add app
button or check the existing package name for the app.google-services.json
and put into your project.Upvotes: 0
Reputation: 5335
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.
Upvotes: 5
Reputation: 370
try to check again your plugin in gradle, I think you forgot to add some plugins
Upvotes: 0