1. 程式人生 > >Unity 打包IOS平臺錯誤

Unity 打包IOS平臺錯誤

1、Unity 下打包

Bulid Failed

Assets/Plugins/uLua/x86_64/ulua.dll would be copied to /ulua.dll

Plugin ‘ulua.dll’ is used from several locations:
Assets/Plugins/uLua/x86_64/ulua.dll would be copied to /ulua.dll
Assets/Plugins/uLua/x86/ulua.dll would be copied to /ulua.dll
Please fix plugin settings and try again.

UnityEditor.Modules.DefaultPluginImporterExtension:CheckFileCollisions(String)
UnityEditorInternal.PluginsHelper:CheckFileCollisions(BuildTarget) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Plugins/PluginsHelper.cs:25)
UnityEditor.HostView:OnGUI()

Plugin ‘ulua.dll’ is used from serveral locations
Assets/Plugins/xxx/ulua.dll would be copied to /ulua.dll 解決方案:

如果是32位Unity編輯器,刪掉x86_64目錄,如果是64位編輯,刪除x86目錄即可。

DXT5 compressed textures are not supported when publishing to iPhone

Bulid Success 但仍然有錯誤,這些問題可能導致遊戲閃退

DXT5 compressed textures are not supported when publishing to iPhone
Assets/FX/textures/daoguang/daoguang_00019.dds
Included from scene:
UnityEditor.HostView:OnGUI()

DXT5 紋理壓縮時不支援釋出iPhone

暫時解決方案:
刪除這種紋理貼圖

2、Xcode下編譯

Signing for “Unity-iPhone” requires a development team. Select a development team in the project editor.

Code signing is required for product type ‘Application’ in SDK ‘iOS 10.3’

原因:
沒有在Signing team裡面添加簽名資訊

ld:’/…/Libraries/Plugins/uLua/iOS/libulua.a(array.o)’ does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

‘XXXX’ was compiled with optimization - stepping may behave oddly; variables may not be available

工程在編譯之後被優化了,所以導致單步的時候程式表現異常,變數也都不能訪問了。這是由於編譯的時候選擇的是 release,而 release 的時候是會做很多優化,導致上述結果。

解決方法

把編譯方式改為Debug。
1、
這裡寫圖片描述
2、
這裡寫圖片描述
3、
這裡寫圖片描述