在 Unity 上安装 Firebase SDK(分析、数据库、消息传递)、Facebook SDK、Playfabs



我正在为Android和iOS设备开发一款使用Unity3d的纸牌游戏。我需要将Firebase SDK用于聊天系统,Playfabs和Facebook SDK用于登录方法。当我尝试在我的项目中安装所有 sdk 时,我遇到了很多问题,因为有很多错误。

没有任何脚本,因为我选择创建一个新项目,并且只安装 sdk。

在此处输入图像描述

System.TypeInitializationException: The type initializer for 'Firebase.Editor.Measurement' threw an exception. ---> System.MissingMethodException: void Google.EditorMeasurement.set_InstallSourceFilename(string)
--- End of inner exception stack trace ---
at Firebase.Editor.AndroidSettingsChecker..cctor () [0x0000c] in Z:tmptmp.pxoeYNk3oGfirebaseappclientunityeditorsrcAndroidAPILevelChecker.cs:37 
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes(Type[])
MissingMethodException: void Google.EditorMeasurement.set_InstallSourceFilename(string)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.Editor.Measurement' threw an exception.
Firebase.Editor.AndroidSettingsChecker..cctor () (at Z:/tmp/tmp.pxoeYNk3oG/firebase/app/client/unity/editor/src/AndroidAPILevelChecker.cs:37)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.Editor.AndroidSettingsChecker' threw an exception.
System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) (at <fb001e01371b4adca20013e0ac763896>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) (at <fb001e01371b4adca20013e0ac763896>:0)
System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) (at <fb001e01371b4adca20013e0ac763896>:0)
System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) (at <fb001e01371b4adca20013e0ac763896>:0)
System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) (at <fb001e01371b4adca20013e0ac763896>:0)
System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) (at <fb001e01371b4adca20013e0ac763896>:0)
System.Activator.CreateInstance (System.Type type) (at <fb001e01371b4adca20013e0ac763896>:0)
UnityEditor.AssetPostprocessingInternal.GetMeshProcessorsHashString () (at <a0a9ad37e16b4f7cb955e1101b72d4cc>:0)
UnityEditor.AssetPostprocessingInternal:GetMeshProcessorsHashString()

他们是错误。有人有同样的问题吗?有什么解决办法吗?

感谢您的所有答案。

[已解决]

安装所有这些SDK时,我们必须从Firebase sdk开始。不要安装解析 sdk,只安装消息传递。在清单上导入依赖项,从现在开始,我们必须拒绝所有更改和合并。最后一个 sdk 必须是 Facebook sdk

最新更新