unity ios warning: arm64 function not 4-byte …
环境:unity 2019.4.22f1c
xcode 12.4
真机联调时正常的,archive 就出错了,意味着发布,release 有问题
如图有两个错误:
[*]ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /Volumes/users/woogi/project/woogicreate/ios/ios291.1/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
[*]ld: '/Volumes/users/woogi/project/woogicreate/ios/ios291.1/Libraries/Plugins/iOS/libtolua.a(tolua-ee3749ee3e3e5db64aa45835a0c26160299f1ee0442009cc92c48a6d641f8d31.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. file '/Volumes/users/woogi/project/woogicreate/ios/ios291.1/Libraries/Plugins/iOS/libtolua.a' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
解决步骤:
1.替换了libtolua.a,依旧有错
2.Unity-iphone修改bitcode 为 no, 依旧报错
3. 替换了libtolua.a Unity-iphone修改bitcode 为 no UnityFramework修改bitcode 为 no,
打包成功
总结:tolua.a 是第三方的库,项目成立以来一直在用,同时Unity-iphone也设置的为no,成功发布了上百个版本。
这次出错的原因:升级unity。 unity2018.4.21f1 升级到 2019.4.22f1c, 同时tolua 在最近有所升级,替换了libtolua.a了。
Unity-iphone 和UnityFramework 的修改是独立,需要把他们两个的bitcode都设置为no. 没有UnityFramework怎么破 你只能多检查看看了,也许每个版本有不同得问题,我是unity2019、xcode12.4 出现得这个问题。
页:
[1]