firebase-unity-sdk: Failed to read Firebase options from the app's resources
[READ] For Firebase Unity SDK issues, please report to Firebase Unity open-source
Once you’ve read this section and determined that your issue is appropriate for this repository, please delete this section.
[REQUIRED] Please fill in the following fields:
- Unity editor version: 2021.3 and 2022.3
- Firebase Unity SDK version: 11.1
- Source you installed the SDK: .unitypackage
- Problematic Firebase Component: Analytics, Crashlytics
- Other Firebase Components in use: N/A
- Additional SDKs you are using: N/A
- Platform you are using the Unity editor on: Windows
- Platform you are targeting: Android
- Scripting Runtime: Mono
[REQUIRED] Please describe the issue here:
(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)
Error firebase Failed to read Firebase options from the app’s resources. Either make sure google-services.json is included in your build or specify options explicitly.
Firebase does not generate the Plugins/Android/FirebaseApp.androidlib & FirebaseCrashlytics.androidlib folders so there is no values/google-services.xml file.
I copied these files from an older install of firebase (2020) and it worked.
Steps to reproduce:
Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)? What’s the issue repro rate? (eg 100%, 1/5 etc)
100% repo rate. Fresh 2021 and 2022 LTS projects.
Add google-services.json and GoogleService-Info.plist to root /Assets/ folder
Import Analytics and Crashlytics unitypackage (downloaded latest from firebase site)
Resolve dependencies in dependency resolver.
Add the sample init code and crashlytics test code (from docs)
Build .apk
Check Logcat
2023/06/13 21:26:30.557 19928 20114 Error firebase Failed to read Firebase options from the app's resources. Either make sure google-services.json is included in your build or specify options explicitly.
What happened? How can we make the problem occur? This could be a description, log/console output, etc.
If you have a downloadable sample project that reproduces the bug you’re reporting, you will likely receive a faster response on your issue.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 15 (1 by maintainers)
I have the same problem, and I agree that is related to this:
but after geting this tip, I went on the Firebase.Editor and disabled the validation for this file, if you click on it, there is a checkbox “Validate References” that I’ve unchecked. After applying the menu “Window>Firebase” started to show ( wasn’t showing previously ) and the folder /Assets/Plugins/Android/FirebaseApp.androidlib was created automaticaly with all the resources inside, including the google-services.xml
BTW, I’m using: Unity 2022.3.7f1 Firebase 11.5.0
Seems that installing iOS build support to my 2022.3 install allowed me to build and confirm that analytics/crashlytics worked. However it didn’t generate the required
google-services.xmlfile. See here: https://github.com/googlesamples/unity-jar-resolver/issues/412#issuecomment-724243829In 2021.3 I was able to get those generated and copied it to my 2022.3 project so it worked as a “fix”.