为Android Unity构建时遇​​到这些奇怪的Xcode / iOS错误

时间:2019-12-24 11:59:35

标签: android firebase unity3d firebase-cloud-messaging facebook-unity-sdk

正在使用的东西:

  1. Unity编辑器版本: 2019.3.0f3
  2. Firebase Unity SDK版本: 6.8.1
  3. 正在使用的Firebase插件(身份验证,数据库等):分析和消息传递
  4. 您正在使用的其他SDK(Facebook,AdMob等): Facebook
  5. 您正在(Mac,Windows或Linux)上使用Unity编辑器的平台: Windows
  6. 您要定位的平台(iOS,Android和/或台式机): Android
  7. 脚本运行时(单声道和/或IL2CPP): IL2CPP。

首先,我的项目完全不了解iOS,我也没有下载iOS模块,但仍然遇到这些似乎与iOS有关的错误。 而且我已经关注了Known Issues 并删除了.NET 3.x两个DLL,现在我的解析文件夹看起来像这样-

See this image

在此之后,我还做了资产> Play服务解析器>版本处理程序>更新内容 但是没有运气,所以这里是我刚开始的日志,

第一个日志:

BadImageFormatException: Could not resolve field token 0x040000dc, due to: Could not load type of field 'Firebase.Editor.XcodeProjectModifier:projectInfoDoc' (2) due to: Could not load file or assembly 'UnityEditor.iOS.Extensions.Xcode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. assembly:UnityEditor.iOS.Extensions.Xcode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null type:<unknown type> member:(null) signature:<none> assembly:F:\Unity Projects\Space Invaders\Assets\Firebase\Editor\Firebase.Editor.dll type:XcodeProjectModifier member:(null) signature:<none>
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
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 <437ba245d8404784b9fbab9b439ac908>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <437ba245d8404784b9fbab9b439ac908>:0)
UnityEditor.Build.BuildPipelineInterfaces+AttributeCallbackWrapper.OnPostprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at <83a73882c51c4602b3d34743827d03e7>:0)
UnityEditor.Build.BuildPipelineInterfaces+<>c__DisplayClass17_0.<OnBuildPostProcess>b__1 (UnityEditor.Build.IPostprocessBuildWithReport bpp) (at <83a73882c51c4602b3d34743827d03e7>:0)
UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List`1[T] oneInterfaces, System.Action`1[T] invocationOne, System.Collections.Generic.List`1[T] twoInterfaces, System.Action`1[T] invocationTwo, System.Boolean exitOnFailure) (at <83a73882c51c4602b3d34743827d03e7>:0)
UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()

第二个日志:

Error building Player: BadImageFormatException: Could not resolve field token 0x040000dc, due to: Could not load type of field 'Firebase.Editor.XcodeProjectModifier:projectInfoDoc' (2) due to: Could not load file or assembly 'UnityEditor.iOS.Extensions.Xcode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. assembly:UnityEditor.iOS.Extensions.Xcode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null type:<unknown type> member:(null) signature:<none> assembly:F:\Unity Projects\Space Invaders\Assets\Firebase\Editor\Firebase.Editor.dll type:XcodeProjectModifier member:(null) signature:<none>

我被困在这一点上,我想不出更多了,我到处搜索但什么也找不到,希望最好;)

2 个答案:

答案 0 :(得分:0)

好的,我通过向Unity添加此 iOS Build Support 模块来解决了该问题。

答案 1 :(得分:0)

我可以通过关闭 Unity 并再次重新打开来修复它!