跳到主要內容

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的快速方法,如果隨著時間推移太舊或是失效,在搜尋一下如何安裝Node即可解決。 題外話:Linux上開發要有所體悟,所有的架構都是在變動的,隨著版本的變動舊的API可能就會改變或是失效,期待不變與或是統一開發方式都是不太切合

nvidia jetson nano 開啟VNC步驟

sudo apt-get update sudo apt-get install nano sudo nano /usr/share/glib-2.0/schemas/org.gnome.Vino.gschema.xml Add this key:     <key name='enabled' type='b'>       <summary>Enable remote access to the desktop</summary>       <description>         If true, allows remote access to the desktop via the RFB         protocol. Users on remote machines may then connect to the         desktop using a VNC viewer.       </description>       <default>false</default>     </key> sudo glib-compile-schemas /usr/share/glib-2.0/schemas gsettings set org.gnome.Vino enabled true gsettings set org.gnome.Vino prompt-enabled false gsettings set org.gnome.Vino require-encryption false # Reboot the system so that the settings take effect sudo reboot /usr/lib/vino/vino-server

小四軸飛行器:驅動馬達

等待陀螺儀 的這段時間馬達先來了,所以我們開始測試馬達驅動系統飛行器的馬達是透過 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 2N70