DllNotFoundException: FirebaseCppApp-11_0_0 assembly: type: member:(null)

Hi I am working with unity and integrating firebase 11.0.0 for using firebase analytics and facing below issues.


  • OS: macOS High Sierra
  • Script Editor: VS Code
  • Unity version: 2021.3.16f1
  • Unity Hub version: 3.4.2
  • Firebase: 11.0.0

###Compile error:

DllNotFoundException: FirebaseCppApp-11_0_0 assembly: type: member:(null)
Firebase.AppUtilPINVOKE+SWIGExceptionHelper…cctor () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/macos_unity/x86_64/app/swig/Firebase.App_fixed.cs:4087)
Rethrow as TypeInitializationException: The type initializer for ‘SWIGExceptionHelper’ threw an exception.

Firebase.AppUtilPINVOKE…cctor () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/macos_unity/x86_64/app/swig/Firebase.App_fixed.cs:4107)
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/macos_unity/x86_64/app/swig/Firebase.App_fixed.cs:4817)

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/macos_unity/x86_64/app/swig/Firebase.App_fixed.cs:2014)

Rethrow as TypeInitializationException: The type initializer for ‘Firebase.FirebaseApp’ threw an exception.

FirebaseInitizlise.Start () (at Assets/FirebaseInitizlise.cs:13)

If I runtime project on android device I get below errors:

1). Internal build system error. Backend exited with code 2.
tundra: error: Unexpected stdin
2). Error building Player because scripts had compiler errors

3). UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002ce] in /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPlayerWindowBuildMethods.cs:193
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPlayerWindowBuildMethods.cs:94
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)

###Tried various solutions with no success:

I have tried giving access to files through security and privacy. And also made all firebase plugins ’s platform settings.
If you have more information that will help us get to the bottom of this, just add a comment! @mgrogin

@ItechHardik - DllNotFoundException: FirebaseCppApp-11_0_0 seems to be a common issue when integrating Firebase with Unity on macOS. It is often associated with either incorrect Firebase SDK setup or improper linking of the necessary dynamic libraries.

Try the following:

  1. Double-check the Firebase SDK installation. Ensure that you’ve followed Firebase’s documentation closely when integrating Firebase SDK with your Unity project. You might want to try removing the SDK and re-importing it.
  2. Make sure your Firebase SDK is compatible with your Unity version. As per the Firebase Unity SDK release notes, make sure that the Firebase SDK version you are using is compatible with your Unity version.
  3. Verify the file path of your dynamic libraries. Ensure that they’re correctly linked to your Unity project.
  4. Reimport all assets. Sometimes Unity might miss importing some files, reimporting all assets can help solve the issue
  5. Try to Clean and then Rebuild the project. This will refresh all the associated files and clear any possible issues.

If you’re still facing the same issue after trying the steps above, it would be helpful to see more about your project setup, specifically how you’re initializing Firebase in your Unity scripts. Please share a simplified version of your Firebase initialization script if possible.

As a side note, for the errors you are encountering on Android devices, it could be related to script compilation errors or possibly an issue with Unity’s internal build system. Ensure that all your scripts compile without errors in the Unity editor before attempting a build.

If none of these solutions work, please let us know more about your project, any additional plugins you’re using, or any other information that could help us diagnose the problem.

@SteenPetersen Thank you for answering my question. I tried all the solutions which you have mentioned. But still facing the same issue.

I have integrating firebase with fresh new project and not using any additional plugins. Below is screenshot of firebase initialising script.

I had this error for ANDROID and I fix it (I haven’t tested it for iOS jet) DllNotFoundException: FirebaseCppApp-11_2_0 assembly:
It was actually very simple for me.

  1. The Firebase and ExternalDependencyManager folders must be located in the Asset folder; you should not move them elsewhere.

  2. Delete the Firebase and ExternalDependencyManager folders and then install each Firebase SDK asset you need.

  3. Run Force resolve.