简体   繁体   English

unity ios build 文件夹为空

[英]Unity ios build folder is empty

I want to build my project for IOS.我想为 IOS 构建我的项目。 I choose folder and build my project.我选择文件夹并构建我的项目。 at the end of the build, my folder is empty.在构建结束时,我的文件夹是空的。 Why?为什么? Can you help me?你能帮助我吗?

There is an error on console:控制台出现错误:

Failed running /Applications/Unity/Unity.app/Contents/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe --api NET_2_0_Subset -out "/Users/arifsanat/Desktop/CityCars/Temp/StagingArea/Data/Managed/tempStrip" -l none -c link -b False -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Core.xml" -f "/Applications/Unity/Unity.app/Contents/il2cpp/LinkerDescriptors" -x "/Users/arifsanat/Desktop/CityCars/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Users/arifsanat/Desktop/CityCars/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "/Users/arifsanat/Desktop/CityCars/Temp/StagingArea/Data/preserved_derived_types.xml" -x "/Users/arifsanat/Desktop/CityCars/Assets/link.xml" -d "/Users/arifsanat/Desktop/CityCars/Temp/StagingArea/Data/Managed" -a "/Users/arifsanat/Desktop/CityCars/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a "/Users/arifsanat/Desktop/CityCars/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll"运行失败 /Applications/Unity/Unity.app/Contents/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe --api NET_2_0_Subset -out "/Users/arifsanat/Desktop/CityCars/Temp/StagingArea/Data/Managed/tempStrip" -l none - c link -b False -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Core.xml" -f "/Applications/Unity/Unity.app/Contents/il2cpp/LinkerDescriptors" -x "/Users/arifsanat/Desktop /CityCars/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Users/arifsanat/Desktop/CityCars/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "/Users/arifsanat/Desktop/ CityCars/Temp/StagingArea/Data/preserved_derived_types.xml" -x "/Users/arifsanat/Desktop/CityCars/Assets/link.xml" -d "/Users/arifsanat/Desktop/CityCars/Temp/StagingArea/Data/Managed" -a "/Users/arifsanat/Desktop/CityCars/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a "/Users/arifsanat/Desktop/CityCars/Temp/StagingArea/Data/Managed/UnityEngine.UI。 dll”

stdout: SweepReport: System.MonoType => Mono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinition Mono.Cecil.MethodDefinition => System.Void .ctor()System.Void .ctor(System.String)System.String get_Comment()System.Void .ctor()System.Boolean get_CanTransformMultipleBlocks() Mono.Cecil.FieldDefinition => System.String commentSystem.Func 3<System.Int32,System.Int32,System.Int32> <>f__am$cache0System.Func 3 <>f__am$cache1System.Func 3<System.Double,System.Double,System.Double> <>f__am$cache2System.Func 3 <>f__am$cache3 Fatal error in Mono CIL Linker Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.RenderTexture at UnusedBytecodeStripper2.AddUnresolvedStubsStep.Process () <0x10afdf960 + 0x002fd> in :0 at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) <0x1096e9ed0 + 0x0006b> in :0 at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) <0x1096e8f90 + 0x000e6> in :0 at Mono.Linker.标准输出:SweepReport:System.MonoType => Mono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinition Mono.Cecil.MethodDefinition => System.Void .ctor()System.Void .Void System.String)System.String get_Comment()System.Void .ctor()System.Boolean get_CanTransformMultipleBlocks() Mono.Cecil.FieldDefinition => System.String commentSystem.Func 3<System.Int32,System.Int32,System.Int32> <>f__am$cache0System.Func 3 <>f__am$cache1System.Func 3<System.Double,System.Double,System.Double> <>f__am$cache2System.Func 3 <>f__am$cache3 Mono CIL Linker Mono 中的致命错误。 Cecil.ResolutionException:无法在 UnusedBytecodeStripper2.AddUnresolvedStubsStep.Process () <0x10afdf960 + 0x002fd> 处解析 UnityEngine.RenderTexture 在:0 在 Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext 上下文) <0x10060e>9 :0 at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) <0x1096e8f90 + 0x000e6> in :0 at Mono.Linker。 Driver.Run (IEqualityComparer 1 typeComparer, IEqualityComparer 1 methodComparer) <0x108606520 + 0x00be7> in :0 at Mono.Linker.Driver.RunDriverWithErrorHandling (Mono.Linker.Driver driver, IEqualityComparer 1 typeComparer, IEqualityComparer 1 methodComparer) <0x1086064d0 + 0x00026> in :0 at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver, IEqualityComparer 1 typeComparer, IEqualityComparer 1 methodComparer) <0x1086063e0 + 0x0003b> in :0 Driver.Run (IEqualityComparer 1 typeComparer, IEqualityComparer 1 methodComparer) <0x108606520 + 0x00be7> in :0 at Mono.Linker.Driver.RunDriverWithErrorHandling (Mono.Linker.Driver driver, IEqualityComparer 1 typeComparer, IEqualityComparer 1 typeComparer10x0060x060x060x060x060x060x060x060x060x060 :0 在 Mono.Linker.Driver.RunDriver (Mono.Linker.Driver 驱动程序, IEqualityComparer 1 typeComparer, IEqualityComparer 1 methodComparer) <0x1086063e0 + 0x0003b> 在 :0

Do steps below:执行以下步骤:

  1. Check your player setting .检查您的播放器设置 For me almost trouble when build iOS App with Unity occurred here.对我来说,使用 Unity 构建 iOS 应用程序时几乎遇到了麻烦。 (If everything okay, go to 2 (如果一切正常,请转到 2

  2. Try to build a empty (or simple) Unity Project and make sure you can build that and run on Xcode successfully.尝试构建一个空的(或简单的)Unity 项目,并确保您可以构建它并在 Xcode 上成功运行。

  3. If 1. 2. is okay, so problem definitely is in your code, check your iOS plugin code (if available) first then C# code.如果 1. 2. 没问题,那么问题肯定出在您的代码中,请先检查您的 iOS 插件代码(如果可用),然后再检查 C# 代码。

  4. If 1.2.3 is okay, try to reinstall your Unity, Xcode app.如果 1.2.3 没问题,请尝试重新安装 Unity、Xcode 应用程序。

  5. If even 4 cant resolve your problem, make a bug report .如果连 4 个都不能解决您的问题,请提交错误报告

Hope this help!希望这有帮助!

We have tracked down the cause of this issue.我们已经找到了这个问题的原因。 It is a bug in the UnusedBytecodeStripper2, and we should have a fix in the 5.5.1p1 patch release if all goes well.这是 UnusedBytecodeStripper2 中的一个错误,如果一切顺利,我们应该在 5.5.1p1 补丁版本中修复。

It might be possible to work around the issue though.不过,也许可以解决这个问题。 Some assembly in the project uses the UnityEngine.RenderTexture::generateMips property, which was renamed to autoGenerateMips in Unity 5.5.项目中的某些程序集使用 UnityEngine.RenderTexture::generateMips 属性,该属性在 Unity 5.5 中重命名为 autoGenerateMips。 The API Updater will correctly make this change to the assembly, but in the bug report, the API Updater did not run on this assembly for an unknown reason. API 更新程序将正确地对程序集进行此更改,但在错误报告中,由于未知原因,API 更新程序未在此程序集上运行。 The assembly in this case was Vuforia.UnityExtensions.dll, but any assembly could be impacted.本例中的程序集是 Vuforia.UnityExtensions.dll,但任何程序集都可能受到影响。

So, it is possible to work around this issue by ensuring that the API Updater has been run on all assemblies in the project.因此,可以通过确保 API 更新程序已在项目中的所有程序集上运行来解决此问题。 You can use ILSpy or ildasm to check the content of an assembly.您可以使用 ILSpy 或 ildasm 检查程序集的内容。 Make sure an assembly does not reference UnityEngine.RenderTexture::generateMips after the API Updater modified it.确保程序集在 API 更新程序修改后不引用 UnityEngine.RenderTexture::generateMips。

I got the same error.我得到了同样的错误。 I resolved it by checking the third party plugin.我通过检查第三方插件解决了它。 Mainly this error is because of link.xml.这个错误主要是因为link.xml。

It may be because you are building it into the Assets folder?可能是因为您将其构建到 Assets 文件夹中? Try saving it to a folder outside the Unity project.尝试将其保存到 Unity 项目之外的文件夹中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM