firebase / quickstart-unity

Firebase Quickstart Samples for Unity
https://firebase.google.com/games
Apache License 2.0
828 stars 428 forks source link

DllNotFoundException: FirebaseCppApp-9_5_0 #1300

Closed BadranRaza closed 2 years ago

BadranRaza commented 2 years ago

DllNotFoundException: FirebaseCppApp-9_5_0

google-oss-bot commented 2 years ago

This issue does not seem to follow the issue template. Make sure you provide all the required information.

BadranRaza commented 2 years ago

I am working on Windows 10 building my game for android and I am facing this issue:

DllNotFoundException: FirebaseCppApp-9_5_0 Firebase.AppUtilPINVOKE+SWIGExceptionHelper..cctor () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/android_unity/armeabi-v7a/app/swig/Firebase.App_fixed.cs:3909) Rethrow as TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception. Firebase.AppUtilPINVOKE..cctor () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/android_unity/armeabi-v7a/app/swig/Firebase.App_fixed.cs:3929) Rethrow as TypeInitializationException: The type initializer for 'Firebase.AppUtilPINVOKE' threw an exception. Firebase.AppUtil.SetLogFunction (Firebase.LogUtil+LogMessageDelegate arg0) (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/android_unity/armeabi-v7a/app/swig/Firebase.App_fixed.cs:4636) Firebase.LogUtil..ctor () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:81) Firebase.LogUtil..cctor () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:37) Rethrow as TypeInitializationException: The type initializer for 'Firebase.LogUtil' threw an exception. Firebase.FirebaseApp..cctor () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/android_unity/armeabi-v7a/app/swig/Firebase.App_fixed.cs:1897) Rethrow as TypeInitializationException: The type initializer for 'Firebase.FirebaseApp' threw an exception. AnalyticsHandler.Awake () (at Assets/AdsScripts/AnalyticsHandler.cs:18)

I am using unity 2020.3.38 I have tried reimporting, deleting Firebase from the project then importing again also I have tried deleting the library folder nothing helped me.

Does anyone have solutions for windows OS.

paulinon commented 2 years ago

Hi @BadranRaza,

Thanks for reporting this issue. Could you confirm if the device you're working on makes use of an updated C++ Redistributable? Also, does the error message appear when playing the Unity editor or running the Android build (or both)?

BadranRaza commented 2 years ago

the error appears on both devices but the issue has been resolved by installing https://all-in-one-runtimes.updatestar.com/en