Closed IgorGalimski closed 2 years ago
Hi @IgorGalimski,
Thanks for reporting this. I see that you provided a screenshot of an Android Studio project hierarchy. Does this mean that you're building for Android?
Additionally, could you confirm if this issue is reproducible when using our quickstart?
Hi, @paulinon Thanks for the fast reply Yes, this issue appears only for Android I've tried, but all these sample projects don't contain Firebase API
@paulinon Hi! I've tried to create a new unity project, import FirebaseCrashlytics_8.6.2.unitypackage, and start Firebase. And I see the same error, regardless of google-services.json is in streaming assets Unity's directory I continue using Unity2020.3.20f1 and build for Android. Please, check out the attached file. I removed the json from the project for security reasons
Hi @IgorGalimski,
After downloading the google-services.json
for your app, it should be placed under the Assets
folder of your Unity project, not StreamingAssets
. Once this is done, a desktop version of your config file will be generated which can be found in Assets
> StreamingAssets
.
Here's our documentation for reference. I look forward to your results.
@paulinon Yes, I did this. But anyway I see the exception that google-services.json not found
Hi @IgorGalimski,
I haven't been able to replicate your issue so far. Here are the steps I performed with the sample project you provided:
google-services.json
file and place it in the Assets folder.Assets
> Scenes
> SampleScene
and press Play (Error message is not present in the Unity console).Are there any steps that I've missed? Additionally, could you try these steps and see if you're facing the issue?
Hi @paulinon
I did the same, but still see the issue
Hi @IgorGalimski,
This behavior seems unusual. Could you confirm if you're facing the same error message in the Unity editor?
Could you also make use of our quickstart and see if the issue persists there as well? You simply need to add your google-services.json
file and the appropriate Firebase SDK which can be found here.
Hi @paulinon I've tried to take a package from dotnet4 folder, but still face the same issue Is it possible to initialize Firebase without this json? I've tried using AppOptions, but it didn't help
Hi @IgorGalimski,
The google-services.json
file is an essential part of your project for you to use Firebase. I have found a thread that talks about this issue, and some developers resolved this by adding a few lines of code in their mainTemplate.gradle
file or renaming their Assets/Plugins/Android/Firebase folder to Assets/Plugins/Android/Firebase.androidlib. Could you try if either solution works for you?
Hi @paulinon I don't have googleservices.xml file
Hi @IgorGalimski,
I can see that in the thread I provided, and it's possible that the author meant google-services.xml
. Do you have this file in your implementation?
Have you tried modifying the mainTemplate.gradle
file or renaming the Firebase folder like I previously mentioned? If so, has either of these resolved the issue?
One thing that may seem stupid but that actually solved the problem for me was to restart Unity. After restarting inside Assets/Plugins/Android a new folder FirebaseApp.androidlib was created and then the "google-services.json is not found" issue was fixed.
Hey @IgorGalimski. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@IgorGalimski if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the issue here:
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
JSON is located in Assets directory and in the project
Also, the issue doesn't appear on the previous version 7.2.0