I would like to use Firebase Analytics for my ANDROID game building in Unity. However, when I follow the document and instructions, during the google-services.json to google-services.xml operation, it fails and says:
Generation of the Firebase Android resource file google-services.xml from Assets/google-services.json failed.
If you have not included a valid Firebase Android resources in your app it will fail to initialize.
`E:/UnityProjects/Seven/Assets\..\Assets/Firebase/Editor/generate_xml_from_google_services_json.exe -i "Assets/google-services.json" -l`.
Error loading Python DLL: C:\Users\ftb\AppData\Local\Temp\_MEI59722\python27.dll (error code 14001)
Therefore, it never extracts my package name an initialize, then it crashes.
The Environment
OS: Windows 7
Unity Version: 2019.2.16f1 (Android Build Support and IOS Build Support)
Visul Studio installs:
Firebase SDK: Firebase Unity SDK 6.8.0 (dotnet4)
The package: FirebaseAnalytics.unitypackage
What I tried
1- I suspected and checked google-services.json. The file is correct (downloaded from firebase dashboard)
2- I have installed dotnet3 firebase sdk package, and failed.
3- I triggered the generate_xml_from_google_services_json.exe file by cmd, then got the same result as unity (Error loading Python DLL: C:\Users\ftb\AppData\Local\Temp_MEI59722\python27.dll (error code 14001))
4- I triggered generate_xml_from_google_services_json.exe without any parameter (without this:-i "C:\gsoogle-services.json" -l), then it exactly responses the same result, "Error loading Python DLL"
5- I moved all the "Editor" folder that comes by Firebase SDK to another machine (Windows Server 2016) and triggered google_services_json.exe by cmd, then it extracted my package name successfully with no error
6- Installed several Redistributable Package provided by Windows, tried and failed.
7- Installed Visual Studio Build Tools, Visual Studio Community 2017, C++ and Desktop builtools, tried and failed.
8- Windows 7 is up to date. Installed all updates
9- Installed python27, python36
10- Copied python27.dll to System, System32 and SysWOW64 windows folders. It still fails.
According to the above list, I think the problem is about the environment settings or Operating System of my computer. All the problem is executing the generate_xml_from_google_services_json.exe file. All it does is to convert google-services.json to google-services.xml
Is it impossible to use Firebase Unity SDK on Windows 7? Is there any way to solve this?
UPDATE
I tried Firebase Unity 10.2.0, results are same. There is no support for Windows 7 any more?
This issue has been solved at Firebase Unity 10.3.0 plugin (December 14, 2022)
I have tried almost all new versions of Firebase Unity from the date Dec 16, 2019 to December 14, 2022. It finally resolved after 3 years.