跳到主要內容

Unity 5.6 ios 編譯的三個錯誤

編譯unity 5.6.x 於ios上 編譯過程會產生三個錯誤,目前知道這個Bug由 IL2CPP 所造成
,選擇Mono2x就不會有事,但Mono2X不能編譯64位元,只能Arm7所以iphone 5s 以上都不能執行

試試看把整個專案搬移至mac 桌面,然後編編譯看看,有機會可以編譯過去

目前只能期待官方 快點修正這個Bug


Failed running /Applications/Unity/Unity.app/Contents/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe --api NET_2_0_Subset -out "/Volumes/SSD_D/Arkit/ArkitFPS2/Temp/StagingArea/Data/Managed/tempStrip" -l none -c link -b true -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Core.xml" -f "/Applications/Unity/Unity.app/Contents/il2cpp/LinkerDescriptors" -x "/Volumes/SSD_D/Arkit/ArkitFPS2/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Volumes/SSD_D/Arkit/ArkitFPS2/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "/Volumes/SSD_D/Arkit/ArkitFPS2/Temp/StagingArea/Data/preserved_derived_types.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/AI.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Animation.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Audio.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Cloth.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Core.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/CrashReporting.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/IMGUI.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Input.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/JSONSerialize.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/ParticleSystem.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/ParticlesLegacy.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/PerformanceReporting.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Physics.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Physics2D.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Terrain.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/TerrainPhysics.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/TextRendering.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/UI.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/UNET.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/UnityAds.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/UnityAnalytics.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/UnityConnect.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/UnityWebRequest.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/UnityWebRequestAudio.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/VR.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Vehicles.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Video.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Web.xml" -d "/Volumes/SSD_D/Arkit/ArkitFPS2/Temp/StagingArea/Data/Managed" -a  "/Volumes/SSD_D/Arkit/ArkitFPS2/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" -a  "/Volumes/SSD_D/Arkit/ArkitFPS2/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a  "/Volumes/SSD_D/Arkit/ArkitFPS2/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll"

stdout:
SweepReport:
Mono.Cecil.TypeDefinition (2132) => UnityEngine.AndroidJavaObject, UnityEngine.AndroidJavaClass, UnityEngine.jvalue, UnityEngine.AndroidJNIHelper, UnityEngine.AndroidJNI, ...
Mono.Cecil.FieldDefinition (777) => AdvertisingIdentifierCallback OnAdvertisingIdentifierCallback, UnityEngine.Application/LogCallback modreq(System.Runtime.CompilerServices.IsVolatile) s_RegisterLogCallbackDeprecated, System.String unsupportedIdentifier, System.Byte kIsVisibleMask, System.Byte kDistanceMask, ...
Mono.Cecil.MethodDefinition (11298) => System.Void .ctor(), System.Void add_lowMemory(UnityEngine.Application/LowMemoryCallback), System.Void remove_lowMemory(UnityEngine.Application/LowMemoryCallback), System.Void Quit(), System.Void CancelQuit(), ...
Fatal error in Mono CIL Linker
System.IO.IOException: Sharing violation on path /Volumes/SSD_D/Arkit/ArkitFPS2/Temp/StagingArea/Data/Managed/tempStrip/UnityEngine.dll.mdb
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0025f] in <b47bf3b895e7418c90fd75ce27f76a5e>:0
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in <b47bf3b895e7418c90fd75ce27f76a5e>:0
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in <b47bf3b895e7418c90fd75ce27f76a5e>:0
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess)
  at Mono.CompilerServices.SymbolWriter.MonoSymbolWriter.WriteSymbolFile (System.Guid guid) [0x0004a] in <6546fe45fa0f433cacda8ee47361b8ed>:0
  at Mono.Cecil.Mdb.MdbWriter.Dispose () [0x00000] in <6546fe45fa0f433cacda8ee47361b8ed>:0
  at Mono.Cecil.ModuleWriter.WriteModuleTo (Mono.Cecil.ModuleDefinition module, System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) [0x000fd] in <c6cbe17310154746b5cee213d0ed414a>:0
  at Mono.Cecil.ModuleDefinition.Write (System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) [0x00022] in <c6cbe17310154746b5cee213d0ed414a>:0
  at Mono.Cecil.ModuleDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x0000a] in <c6cbe17310154746b5cee213d0ed414a>:0
  at Mono.Cecil.AssemblyDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x00000] in <c6cbe17310154746b5cee213d0ed414a>:0
  at Mono.Linker.Steps.OutputStep.OutputAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x0004d] in <fa8b4adb8d9b4daba31cfb0ed5af445d>:0
  at Mono.Linker.Steps.OutputStep.ProcessAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x00001] in <fa8b4adb8d9b4daba31cfb0ed5af445d>:0
  at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) [0x00031] in <fa8b4adb8d9b4daba31cfb0ed5af445d>:0
  at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00019] in <fa8b4adb8d9b4daba31cfb0ed5af445d>:0
  at Mono.Linker.Driver.Run (System.Collections.Generic.IEqualityComparer`1[T] typeComparer, System.Collections.Generic.IEqualityComparer`1[T] methodComparer) [0x003e2] in <fa8b4adb8d9b4daba31cfb0ed5af445d>:0
  at Mono.Linker.Driver.RunDriverWithErrorHandling (Mono.Linker.Driver driver, System.Collections.Generic.IEqualityComparer`1[T] typeComparer, System.Collections.Generic.IEqualityComparer`1[T] methodComparer) [0x00001] in <fa8b4adb8d9b4daba31cfb0ed5af445d>:0
  at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver, System.Collections.Generic.IEqualityComparer`1[T] typeComparer, System.Collections.Generic.IEqualityComparer`1[T] methodComparer) [0x00002] in <fa8b4adb8d9b4daba31cfb0ed5af445d>:0
stderr:

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:96)
UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:102)
UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:95)
UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String[], String[], String, IIl2CppPlatformProvider, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:201)
UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:126)
UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:143)
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
UnityEditor.HostView:OnGUI()


Exception: /Applications/Unity/Unity.app/Contents/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe did not run properly!
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1 setupStartInfo) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:98)
UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (IEnumerable`1 args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:102)
UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String[] assemblies, System.String[] searchDirs, System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String linkerPath, IIl2CppPlatformProvider platformProvider, IEnumerable`1 additionalBlacklist) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:95)
UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (System.String stagingAreaData, IEnumerable assemblies, System.String managedAssemblyFolderPath, System.String[] assembliesToStrip, System.String[] searchDirs, System.String monoLinkerPath, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:201)
UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:126)
UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:143)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, Boolean debugBuild) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
UnityEditor.iOS.PostProcessiPhonePlayer.CrossCompileManagedDlls (BuildSettings bs, UnityEditor.iOS.ProjectPaths paths, UnityEditor.AssemblyReferenceChecker checker, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport buildReport) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:768)
UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (BuildSettings bs, UnityEditor.iOS.ProjectPaths paths, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport buildReport) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:586)
UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (PostProcessorSettings postProcessorSettings, BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:546)
UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:34)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:186)
UnityEditor.HostView:OnGUI()

Error building Player: 3 errors

留言

這個網誌中的熱門文章

使用藍牙BLE 讓iphone android 連接樹莓派3 raspberry pi 3

        Raspberry PI 3 終於內建藍牙與網路晶片 這個晶片有點強大,可以 同時 讓Wifi 與 BLE 和 SPP (RF Com) 同時繁忙通訊都沒有問題。        Raspberry PI 如果是當成藍牙Client 連結身邊的BLE裝置,例如ibeancon、智慧手環、智慧手錶,那只要使用簡單hcitool搭配hciconfig 指令就可以達到將資料要回來,在網路關鍵字一下就可以找到如何使用hcitool 連線並要得資料。      手機要與 Raspberry PI連線的方法可以透過,wifi 或是藍牙,但是操作上使用藍牙比較直覺與簡易。但是要讓手機連線 Raspberry PI, Raspberry PI上就需要將藍牙裝置當成Server,這件事情就需要一些程式碼上的撰寫。     現在的文件說到關於如何將 Raspberry PI藍牙裝置當成Server的文章並不太多,開發上總感覺困難重重,我也是在這裡停滯了好多天,不斷的搜尋解決方法,因為通起來了,資料來自網路所以也回饋給網路,讓下一個使用者減少這類問題的負擔。 不過目前這個方法未來開發資源越來越齊備可能不敷使用,但至少現在是可用的備案。     網路上搜尋之後,整體套件如下 藍牙硬體<== BlueZ <== Nodejs(Bleno) <== Node Ble <==  Node  Socket  <==你的程式 我們發現藍牙要動起來通常會倚賴BlueZ的套件,好在的是最新的版作業系統已經將BlueZ提升到5.23,支援BLE了。 所以安裝BlueZ套件這件事情就可以省略。        接著安裝 Node 環境 , http://blog.itist.tw/2016/04/using-raspberry-pi-3-to-build-eddystone-beacons-with-raspbian-jessie.html 於這篇網址提到安裝Node的快速方法,如...

四軸飛行器:飛控板DIY

最近 我有時會問自己為什麼要從Arduino 開始弄非控板,而不去買已經整體弄好的Multiwii 非控板,其實主要是自己組裝出來的樂趣, 學習過程中嘗試透過各種資源與方法解決問題的能力 ,其實MAKER的資源很多,但怎麼應用這些資源裁示值得學習的,凌爸學習東西喜歡直接做,做的過程當中,自然就會了解WHY與HOW,這遠比看書學習的效果高上很多。 零件陸陸續續一包一包來了,發現郵費比零件貴太多~~~~@@,今天先把非控板黏在冰棒棍上,如下 正面   背面 上至下分別是 Arduino Nano,MPU6050(GY521),藍芽模組(4.0),至於固定的方式目前只是用一條雙面膠讓他們黏在上面,因為我還在考慮是否使用藍芽模組4.0還是2.1 ,2.1的好處是ARDUINO的燒錄與調適可以直接透過藍牙,如果是使用4.0就只能飛行與設定,不能燒入Arduino,但是藍牙4.0的優點是iphone 也可以控制,所以目前就先黏上藍牙4.0。 第一步 先讓Arduino 與 GY521通訊起來,這樣的開始就會特別有感覺,由於想要呈現比較高質感的電路圖,發現一套很棒的軟體  http://fritzing.org/home/   fritzing 這一套電路圖軟體居然是OPEN SOURCE的,且畫出來的畫面很棒又簡單,也推薦給妳試試看,其實我蠻害怕畫電路圖的因為PROTEL太龐大了,我又不是本科系的所以電路圖對我來說太恐怖, fritzing玩起來像是玩具一樣,完全消除我心中的恐懼感。真是太感謝了,也學習到快速畫電路圖的技巧。 GY521與ARDUINO的通訊很簡單,透過I2C的連線方式即可,其實我並不太知道I2C是什麼,但是維基百科說( https://zh.wikipedia.org/zh-tw/I%C2%B2C ),他是一種並聯通訊,所以我們ARDUINO上的SCL、SDA,連結到裝置的SCL、SDA之間就可以透過I2C資料傳遞。由圖可以 知道 A5 是SCL A4 是SDA 圖片網址 http://www.pighixxx.com/test/portfolio-items/nano/ 連接圖如下 A5 是SCL A4 是SDA 電源 5V 與接地 然後還...

小四軸飛行器:驅動馬達

等待陀螺儀 的這段時間馬達先來了,所以我們開始測試馬達驅動系統飛行器的馬達是透過 Arduino 發出 PWM 訊號,傳送給驅動器 ( 小型為 MOS FET ,大型為電調 ) 控制馬達的轉速,達到控制飛行器。為了測試我們的驅動電路,我們先寫一個簡單的 PWM 控制,讓 PWM 輸出值越來越大,到大極限的時候,又慢慢地變小,如果我們的驅動電路可以正常運作時我們應該可以聽到馬達的聲音漸漸地變大,然後漸漸地變小。 測試馬達之前我們先學習 Arduino 的 PWM ,學習的過程當中我參考了下面的網站 http://coopermaa2nd.blogspot.tw/2011/07/6-pwm.html http://coopermaa2nd.blogspot.tw/2011/07/61-pwm-modes-part1.html 感謝 Cooper Maa 。       一開始我們先使用一個 LED 正腳接再 PWM Nano 的 D3 ,然後負腳接到 GND ,接著寫讓 PWM 變大變小的程式 然後又找到如下網站 葉難 :Arduino 練習 : 呼吸燈 http://yehnan.blogspot.tw/2012/02/arduino_16.html 使用網站上的程式碼,我們可以看到燈慢慢亮起來,又慢慢的暗下去, 如果看到這樣的結果代表我們的 PWM 範例程是可以動作。 當呼吸燈完成了,代表我們的程式碼是沒有問題的 ( 如果有問題就是電路的問題 ) ,接下來只要把 LED 腳換成馬達控制腳,就可以測試我們的驅動。 查詢了一下 SI2302 ,由下表可以知道為什麼選用這個 IC ,這張表是在某個賣場抓到的 http://taiwan.tmall.com/item/20689248199.htm? 型號 電流 電壓 標示 極性 封裝 2SK3018 100MA 30V KN N 通道 SOT23 ...