Unity 3d:在构建i

时间:2016-02-18 14:42:56

标签: c# unity3d

我正在努力让我的团结3D游戏为iOS构建。我将脚本后端设置为IL2CPP(armv7和arm64),我收到以下错误..

  

运行失败   /Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe   -out" / Users / macbook / Documents / imbatouch / project / ACT / Temp / StagingArea / Data / Managed"   -l none -c link -x" /Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper/native_link.xml"   -f" /Applications/Unity/Unity.app/Contents/Frameworks/il2cpp/LinkerDescriptors"   -x" / Users / macbook / Documents / imbatouch / project / ACT / Temp / StagingArea / Data / Managed /../ platform_native_link.xml"   -x" /Users/macbook/Documents/imbatouch/project/ACT/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml"   -d" / Users / macbook / Documents / imbatouch / project / ACT / Temp / StagingArea / Data / Managed"   -a" /Users/macbook/Documents/imbatouch/project/ACT/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll"   -a" /Users/macbook/Documents/imbatouch/project/ACT/Temp/StagingArea/Data/Managed/Assembly-UnityScript.dll"   -a" /Users/macbook/Documents/imbatouch/project/ACT/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll"   -a" /Users/macbook/Documents/imbatouch/project/ACT/Temp/StagingArea/Data/Managed/LitJson.dll"   -a" /Users/macbook/Documents/imbatouch/project/ACT/Temp/StagingArea/Data/Managed/System.Configuration.dll"   -a" /Users/macbook/Documents/imbatouch/project/ACT/Temp/StagingArea/Data/Managed/System.Data.dll"   -a" /Users/macbook/Documents/imbatouch/project/ACT/Temp/StagingArea/Data/Managed/System.EnterpriseServices.dll"   -a" /Users/macbook/Documents/imbatouch/project/ACT/Temp/StagingArea/Data/Managed/System.Security.dll"

     

标准输出;错误:无法解析基本类型   类型的System.Configuration.ConfigurationException   System.Configuration.ConfigurationErrorsException Mono中的致命错误   CIL链接器System.Exception:错误:无法解析基本类型   类型的System.Configuration.ConfigurationException   System.Configuration.ConfigurationErrorsException at   UnusedBytecodeStripper2.ResolveFromMonoBehaviours.IsMonoBehaviourOrScriptableObject   (Mono.Cecil.TypeDefinition类型)[0x00000] in:0
  在   System.Linq.Enumerable + c__Iterator35 1[Mono.Cecil.TypeDefinition].MoveNext () [0x00000] in <filename unknown>:0 at UnusedBytecodeStripper2.ResolveFromMonoBehaviours.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0 at Mono.Linker.Driver.Run () [0x00000] in <filename unknown>:0 at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver) [0x00000] in <filename unknown>:0 stderr: UnityEngine.Debug:LogError(Object) UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase) UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable
1,   String&amp;,String&amp;,String,String)   UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String,String,   String&amp;,String&amp;,String,String,IEnumerable 1) UnityEditorInternal.AssemblyStripper:Strip(String, String, String&, String&, String, String, IEnumerable 1)   UnityEditorInternal.AssemblyStripper:Strip(String [],String [],String,   String,String&amp;,String&amp;,String,String,IEnumerable 1) UnityEditorInternal.IL2CPPBuilder:RunAssemblyStripper(IEnumerable, String, String[], String[], String) UnityEditorInternal.IL2CPPBuilder:StripAssemblies(IEnumerable 1,   String)UnityEditorInternal.IL2CPPBuilder:Run()   UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String,String,   IIl2CppPlatformProvider,Action`1,RuntimeClassRegistry)   UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

1 个答案:

答案 0 :(得分:2)

此错误通常表示您用于构建项目的.NET配置文件(Unity编辑器播放器设置中称为“Api兼容级别”)存在问题。我怀疑在项目中使用与用于构建项目的配置文件不同的配置文件构建了一个程序集。尝试更改“Api兼容级别”设置 - 这可能会解决此问题。