ios - Unity3d 4.6.3交叉编译失败

标签 ios unity3d mono

我正在尝试查找项目的问题。我在项目中安装了Windows / OS X / Android / iOS,但是在更新到4.6.3(&4.6.3p1)之后编译iOS时遇到了问题。 Win / OS X / Android全部构建都没有问题。所有目标均使用4.6.2没问题。

在为iOS构建时,我现在收到“交叉编译失败”错误:

stdout:
Mono Ahead of Time compiler - compiling assembly /Users/xxx/Temp/StagingArea/Data/Managed/Mono.WebBrowser.dll
Invoking method 'System.Runtime.InteropServices.InterfaceTypeAttribute:.ctor (System.Runtime.InteropServices.ComInterfaceType)' when running in no-exec mode.

stderr:

  at UnityEditor.MonoProcessUtility.RunMonoProcess (System.Diagnostics.Process process, System.String name, System.String     resultingFile) [0x00000] in <filename unknown>:0
  at UnityEditor.MonoCrossCompile.CrossCompileAOT (BuildTarget target, System.String crossCompilerAbsolutePath, System.String assembliesAbsoluteDirectory, CrossCompileOptions crossCompileOptions, System.String input, System.String output, System.String additionalOptions) [0x00000] in <filename unknown>:0 
  at UnityEditor.MonoCrossCompile+JobCompileAOT.ThreadPoolCallback (System.Object threadContext) [0x00000] in <filename unknown>:0
UnityEditor.HostView:OnGUI()

通过创建仅包含一个脚本和此DLL的示例项目,我将其范围缩小到Windows构建中使用的System.Windows.Forms.dll。 DLL的导入使用预处理器:
#if UNITY_STANDALONE_WIN
usingSystem.Windows.Forms;
#endif

但是,即使删除了此文件,只要DLL包含在asset / plugins文件夹中,构建也将失败。剥离级别设置为“ strip 字节码”。 Api兼容性级别设置为“.NET 2.0”。该DLL来自Unity.app/Contents/Frameworks/Mono/lib/mono/2.0/。

有什么想法为什么现在在4.6.3中被打破了?

最佳答案

尝试在Assets/Plugins/x86/Assets/Plugins/x86_64中添加dll-不应为iOS编译。

请参阅统一维基条目:Special Folder Names in your Assets Folder

关于ios - Unity3d 4.6.3交叉编译失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28780248/

相关文章:

c# - 我必须调用 Application.ExitThread() 吗?

ios - Firebase Auth Google - 始终询问帐户

c# - Unity 5联网色彩同步

ios - WKWebView 禁用快速缩放和编辑

c# - 在 Unity 中按字符串名称访问数组索引

c# - unity 名称 ' unzip ' 在当前上下文中不存在

docker - Ubuntu Docker 镜像具有最少的单声道运行时间,以便运行 F# 应用程序

mono - 无法使用 mkbundle 编译简单的 C# 应用程序

ios - 自返回首次执行以来,如何返回从 block 中获取的对象?

ios - 在多个 WKWebView 之间共享 session