简体   繁体   English

Unity - DllNotFoundException:无法加载 DLL“FirebaseCppApp-10_2_0”。 在安卓系统上

[英]Unity - DllNotFoundException: Unable to load DLL 'FirebaseCppApp-10_2_0'. on android build

I am using unity engine with firebase and I am trying to do a build for android, it does work but the firebase functions are not and I get this errors: (on the editor its working fine)我正在使用带有 firebase 的 unity 引擎,我正在尝试为 android 构建,它确实有效,但 firebase 函数没有,我得到这个错误:(在编辑器上它工作正常)

` `

AndroidPlayer "samsung_SM-G988N" DllNotFoundException: Unable to load DLL 'FirebaseCppApp-10_2_0'. Tried the load the following dynamic libraries: Unable to load dynamic library 'FirebaseCppApp-10_2_0' because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen failed: library "FirebaseCppApp-10_2_0" not found
  at Firebase.AppUtilPINVOKE+SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_AppUtil (Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate applicationDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate arithmeticDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate divideByZeroDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate indexOutOfRangeDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate invalidCastDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate invalidOperationDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate ioDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate nullReferenceDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate outOfMemoryDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate overflowDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate systemExceptionDelegate) [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.AppUtilPINVOKE+SWIGExceptionHelper..cctor () [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.AppUtilPINVOKE..cctor () [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.AppUtil.SetLogFunction (Firebase.LogUtil+LogMessageDelegate arg0) [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.LogUtil..ctor () [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.LogUtil..cctor () [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.FirebaseApp..cctor () [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.Database.FirebaseDatabase.get_DefaultInstance () [0x00000] in <00000000000000000000000000000000>:0 
  at MultiPlayerMenu.Start () [0x00000] in <00000000000000000000000000000000>:0 
Rethrow as TypeInitializationException: The type initializer for 'Firebase.AppUtilPINVOKE.SWIGExceptionHelper' threw an exception.
  at Firebase.AppUtilPINVOKE..cctor () [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.AppUtil.SetLogFunction (Firebase.LogUtil+LogMessageDelegate arg0) [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.LogUtil..ctor () [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.LogUtil..cctor () [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.FirebaseApp..cctor () [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.Database.FirebaseDatabase.get_DefaultInstance () [0x00000] in <00000000000000000000000000000000>:0 
  at MultiPlayerMenu.Start () [0x00000] in <00000000000000000000000000000000>:0 
Rethrow as TypeInitializationException: The type initializer for 'Firebase.AppUtilPINVOKE' threw an exception.
  at Firebase.AppUtil.SetLogFunction (Firebase.LogUtil+LogMessageDelegate arg0) [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.LogUtil..ctor () [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.LogUtil..cctor () [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.FirebaseApp..cctor () [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.Database.FirebaseDatabase.get_DefaultInstance () [0x00000] in <00000000000000000000000000000000>:0 
  at MultiPlayerMenu.Start () [0x00000] in <00000000000000000000000000000000>:0 
Rethrow as TypeInitializationException: The type initializer for 'Firebase.LogUtil' threw an exception.
  at Firebase.FirebaseApp..cctor () [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.Database.FirebaseDatabase.get_DefaultInstance () [0x00000] in <00000000000000000000000000000000>:0 
  at MultiPlayerMenu.Start () [0x00000] in <00000000000000000000000000000000>:0 
Rethrow as TypeInitializationException: The type initializer for 'Firebase.FirebaseApp' threw an exception.
  at Firebase.Database.FirebaseDatabase.get_DefaultInstance () [0x00000] in <00000000000000000000000000000000>:0 
  at MultiPlayerMenu.Start () [0x00000] in <00000000000000000000000000000000>:0 



` `

For now I tried to remove unity library and it did nothing I tried to change to IL2CPP and toggle arm64 and it did nothing when I try android force resolve it will fail and I get this:现在我尝试删除统一库但它什么也没做 我尝试更改为 IL2CPP 并切换 arm64 并且当我尝试 android force resolve 时它什么也没做它会失败我得到这个:

` `

Resolution failed

Failed to fetch the following dependencies:
com.google.firebase:firebase-app-unity:+
com.google.firebase:firebase-auth-unity:+
com.google.firebase:firebase-database-unity:+


UnityEngine.Debug:LogError (object)
Google.Logger:Log (string,Google.LogLevel) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/Logger.cs:136)
GooglePlayServices.PlayServicesResolver:Log (string,Google.LogLevel) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/AndroidResolver/src/PlayServicesResolver.cs:1069)
GooglePlayServices.GradleResolver:LogMissingDependenciesError (System.Collections.Generic.List`1<string>) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/AndroidResolver/src/GradleResolver.cs:95)
GooglePlayServices.GradleResolver/<DoResolutionUnsafe>c__AnonStorey18:<>m__22 (System.Collections.Generic.List`1<Google.JarResolver.Dependency>) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/AndroidResolver/src/GradleResolver.cs:920)
GooglePlayServices.GradleResolver/<GradleResolution>c__AnonStorey11:<>m__17 () (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/AndroidResolver/src/GradleResolver.cs:383)
GooglePlayServices.GradleResolver/<GradleResolution>c__AnonStorey11:<>m__27 () (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/AndroidResolver/src/GradleResolver.cs:448)
GooglePlayServices.GradleResolver/<ProcessAars>c__AnonStorey1B:<>m__24 () (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/AndroidResolver/src/GradleResolver.cs:1123)
Google.RunOnMainThread:ExecutePollingJobs () (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:409)
Google.RunOnMainThread:<ExecuteAllUnnested>m__12 () (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:541)
Google.RunOnMainThread:RunAction (System.Action) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:343)
Google.RunOnMainThread:ExecuteAllUnnested (bool) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:530)
Google.RunOnMainThread:PollOnUpdateUntilComplete (System.Func`1<bool>,bool) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:379)
GooglePlayServices.PlayServicesResolver:LabelAssets (System.Collections.Generic.IEnumerable`1<string>,System.Action`1<System.Collections.Generic.HashSet`1<string>>,bool,System.Action`2<single, string>,bool,bool) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/AndroidResolver/src/PlayServicesResolver.cs:2374)
GooglePlayServices.GradleResolver:ProcessAar (string) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/AndroidResolver/src/GradleResolver.cs:1425)
GooglePlayServices.GradleResolver/<ProcessAars>c__AnonStorey1B:<>m__24 () (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/AndroidResolver/src/GradleResolver.cs:1093)
Google.RunOnMainThread:ExecutePollingJobs () (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:409)
Google.RunOnMainThread:<ExecuteAllUnnested>m__12 () (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:541)
Google.RunOnMainThread:RunAction (System.Action) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:343)
Google.RunOnMainThread:ExecuteAllUnnested (bool) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:530)
Google.RunOnMainThread:PollOnUpdateUntilComplete (System.Func`1<bool>,bool) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:379)
GooglePlayServices.PlayServicesResolver:LabelAssets (System.Collections.Generic.IEnumerable`1<string>,System.Action`1<System.Collections.Generic.HashSet`1<string>>,bool,System.Action`2<single, string>,bool,bool) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/AndroidResolver/src/PlayServicesResolver.cs:2374)
GooglePlayServices.GradleResolver:ProcessAar (string) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/AndroidResolver/src/GradleResolver.cs:1425)
GooglePlayServices.GradleResolver/<ProcessAars>c__AnonStorey1B:<>m__24 () (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/AndroidResolver/src/GradleResolver.cs:1093)
Google.RunOnMainThread:ExecutePollingJobs () (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:409)
Google.RunOnMainThread:<ExecuteAllUnnested>m__12 () (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:541)
Google.RunOnMainThread:RunAction (System.Action) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:343)
Google.RunOnMainThread:ExecuteAllUnnested (bool) (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:530)
Google.RunOnMainThread:ExecuteAll () (at /Users/drsanta/dev/tmp/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:512)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
`

What should I do?我应该怎么办? I impoted only the firebase database我只导入了 firebase 数据库

Yeah, I have caught this problem too, and need to manually add Firebase App (Core) package, which should be dependency but seem like its not.是的,我也遇到了这个问题,需要手动添加Firebase App(Core)包,这应该是依赖但似乎不是。 This could happen if you mix different versions of the libraries.如果您混合使用不同版本的库,则可能会发生这种情况。 Can you verify that all the Firebase libraries you're using are the same version?您能否确认您使用的所有 Firebase 库都是同一版本? The issue is that there is no way to specify exact dependency version for Unity Package Manager unfortunately.不幸的是,问题是无法为 Unity Package Manager 指定确切的依赖版本。 The version number used in package manifest is more like the min version unless the major version is changed.除非更改主要版本,否则包清单中使用的版本号更像是最小版本。 That is why we documented this at the bottom of this section这就是我们在本节底部记录这一点的原因

There might be something we can do in the EDM4U side to fill this void.我们可以在 EDM4U 方面做一些事情来填补这个空白。 It will take some time to develop since it changes not only EDM4U, but also the metadata from registry server and the release process.开发需要一些时间,因为它不仅改变了 EDM4U,还改变了注册服务器的元数据和发布过程。

Until then, please make sure not only Firebase packages are in the same version, but also Firebase App (Core), which installed as a dependency, is in the same version as well.在此之前,请确保不仅 Firebase 包在同一版本,而且作为依赖项安装的 Firebase 应用程序(核心)也在同一版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Unity + Firebase:无法加载 DLL 'FirebaseCppApp-10_3_0' - Unity + Firebase: Unable to load DLL 'FirebaseCppApp-10_3_0' Unity Firebase “无法加载默认应用程序的选项”错误 - Unity Firebase "Unable to load options for default app" error PHP 启动无法加载动态库 /usr/lib/php/20151012/php_mysqli.dll - PHP Startup Unable to load dynamic library /usr/lib/php/20151012/php_mysqli.dll 添加后无法构建项目 Firebase 性能 - Android - Unable to build project after adding Firebase Performance - Android 升级 Android Gradle 插件 7.1 后无法加载 class AndroidComponentsExtension - Unable to load class AndroidComponentsExtension after upgrading the Android Gradle Plugin 7.1 如何修复 Azure 应用程序服务无法加载 DLL 'libwkhtmltox' 或其依赖项之一 - How to fix Azure app service unable to load DLL 'libwkhtmltox' or one of its dependencies Unity 登陆 anynomous android - Unity sign in anynomous on android Unity 的 Resources.load 是否与 Firebase 不兼容? - Is Unity's Resources.load incompatible with Firebase? Visual Studio 调试器不适用于从程序集源文件构建的 DLL? - Visual Studio debugger not working for a DLL build from assembly source files? unity build iOS framework add failed due to a CocoaPods 安装失败 - Unity build iOS framework addition failed due to a CocoaPods installation failure
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM