unity3d Unity -未找到DllException:无法加载DLL 'firebaseCppApp-10_2_0'.在Android构建版本上

js4nwp54  于 2022-12-23  发布在  Android
关注(0)|答案(1)|浏览(360)

我正在使用Unity Engine与Firebase,我试图为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

'
现在我尝试删除Unity库,但它没有任何作用。我尝试更改为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 ()
`

我该怎么办?我只导入了firebase数据库

jk9hmnmh

jk9hmnmh1#

是的,我也发现了这个问题,需要手动添加Firebase App(核心)封装,这应该是依赖关系,但看起来不是。如果您混合使用不同版本的库,可能会发生这种情况。您能否验证您使用的所有Firebase库都是同一版本?问题是,不幸的是,无法为Unity Package Manager指定确切的依赖关系版本。包清单中使用的版本号更像是最小版本号,除非主版本号发生了变化,这就是为什么我们在本节的底部对此进行了说明
也许我们可以在EDM4U方面做些什么来填补这个空白。这将需要一些时间来开发,因为它不仅改变了EDM4U,而且还改变了注册服务器的元数据和发布过程。
在此之前,请确保不仅Firebase软件包是同一版本,而且作为依赖项安装的Firebase应用程序(核心)也是同一版本。

相关问题