Unity Fabric/Crashytics 集成失败
Posted
技术标签:
【中文标题】Unity Fabric/Crashytics 集成失败【英文标题】:Unity Fabric/Crashytics integration failure 【发布时间】:2018-11-09 12:47:05 【问题描述】:我无法将 Fabric 包集成到我的统一项目中。
在我导入最新的包版本 1.2.8 之后。我可以登录 Fabric,选择我的组织并选择要导入的 Crashlytics。这就是崩溃发生的地方。 Crashlytics 包已下载,在导入完成时它会崩溃,或者如果我幸运地冻结在 Fabric 窗口上会产生这些错误:
SynchronizationLockException: Object synchronization method was called from an unsynchronized block of code.
Fabric.Internal.Editor.Update.Dependency.DependencyGraphManager.Continue () (at Assets/Fabric/Editor/Update/Dependency/DependencyGraphManager.cs:44)
Fabric.Internal.Editor.Update.PeriodicUpdateManager.Continue () (at Assets/Fabric/Editor/Update/PeriodicUpdateManager.cs:105)
Fabric.Internal.Editor.Controller.PluginController.CleanKitUpgrade (System.String name) (at Assets/Fabric/Editor/GUI/Controller/PluginController.cs:403)
Fabric.Internal.Editor.Controller.PluginController.PageFromState () (at Assets/Fabric/Editor/GUI/Controller/PluginController.cs:468)
Fabric.Internal.Editor.Editor.OnGUI () (at Assets/Fabric/Editor/GUI/Editor.cs:52)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:305)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:313)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/referencesource/mscorlib/system/reflection/methodbase.cs:229)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:295)
UnityEditor.HostView.Invoke (System.String methodName) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:288)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:261)
UnityEditor.DockArea.OldOnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:398)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt) (at /Users/builduser/buildslave/unity/build/Runtime/UIElements/Managed/IMGUIContainer.cs:182)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
和
NullReferenceException: Object reference not set to an instance of an object
Fabric.Internal.Editor.Editor.OnGUI () (at Assets/Fabric/Editor/GUI/Editor.cs:54)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:305)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:313)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/referencesource/mscorlib/system/reflection/methodbase.cs:229)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:295)
UnityEditor.HostView.Invoke (System.String methodName) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:288)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:261)
UnityEditor.DockArea.OldOnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:398)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt) (at /Users/builduser/buildslave/unity/build/Runtime/UIElements/Managed/IMGUIContainer.cs:198)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at /Users/builduser/buildslave/unity/build/Runtime/UIElements/Managed/IMGUIContainer.cs:338)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoRepaint (UnityEngine.IStylePainter painter) (at /Users/builduser/buildslave/unity/build/Runtime/UIElements/Managed/IMGUIContainer.cs:69)
UnityEngine.Experimental.UIElements.Panel.PaintSubTree (UnityEngine.Event e, UnityEngine.Experimental.UIElements.VisualElement root, UnityEngine.Matrix4x4 offset, UnityEngine.Rect currentGlobalClip) (at /Users/builduser/buildslave/unity/build/Runtime/UIElements/Managed/Panel.cs:532)
UnityEngine.Experimental.UIElements.Panel.PaintSubTreeChildren (UnityEngine.Event e, UnityEngine.Experimental.UIElements.VisualElement root, UnityEngine.Matrix4x4 offset, UnityEngine.Rect textureClip) (at /Users/builduser/buildslave/unity/build/Runtime/UIElements/Managed/Panel.cs:547)
UnityEngine.Experimental.UIElements.Panel.PaintSubTree (UnityEngine.Event e, UnityEngine.Experimental.UIElements.VisualElement root, UnityEngine.Matrix4x4 offset, UnityEngine.Rect currentGlobalClip) (at /Users/builduser/buildslave/unity/build/Runtime/UIElements/Managed/Panel.cs:536)
UnityEngine.Experimental.UIElements.Panel.Repaint (UnityEngine.Event e) (at /Users/builduser/buildslave/unity/build/Runtime/UIElements/Managed/Panel.cs:564)
UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at /Users/builduser/buildslave/unity/build/Runtime/UIElements/Managed/UIElementsUtility.cs:241)
UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /Users/builduser/buildslave/unity/build/Runtime/UIElements/Managed/UIElementsUtility.cs:78)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /Users/builduser/buildslave/unity/build/Runtime/IMGUI/Managed/GUIUtility.cs:175)
还有其他人对 Fabric 集成有任何问题并知道如何解决这个问题吗?
我正在使用 Unity 2017.4.4f1 和脚本运行时版本 .Net 4.6
【问题讨论】:
我也有同样的问题。你解决了吗? @Oskar 在 Fabric 的 Mike 的帮助下,我设法解决了这个问题。他建议删除FabricSettings
文件并重置所有内容,我能够成功安装所有内容,希望对您有所帮助
@AdamSutcliffe 是的,删除编辑器默认资源中的 Fabric 设置文件就可以了。谢谢!
【参考方案1】:
正如 cmets 中提到的Adam Sutcliffe
-
只需删除此文件:
Assets/Editor Default Resources/FabricSettings
再次点击Fabric > Prepare Fabric
登录并继续您的设置。
赢了!
【讨论】:
【参考方案2】:删除文件不起作用。
对我来说,文件 KitSelectionPage
(第 75-79 行)和 OrganizationsPage
(第 72-76 行)中的工作注释行:
【讨论】:
以上是关于Unity Fabric/Crashytics 集成失败的主要内容,如果未能解决你的问题,请参考以下文章
Unity3D - 我可以使用 .NET 4.5 程序集作为外部库吗?
在 Unity 上安装 Firebase 时出现错误“正在卸载损坏的程序集”
错误 CS0246:找不到类型或命名空间名称“Player”(您是不是缺少 using 指令或程序集引用?) Unity [关闭]