VSTS Build Generation抛出无效的位码版本错误 [英] VSTS Build Generation throwing Invalid bitcode version error

查看:192
本文介绍了VSTS Build Generation抛出无效的位码版本错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要为测试人员生成内部版本,我们在项目中使用VSTS.当我们检出并使用xcode在我们的Mac中运行分支时,它工作正常. 但是,当我尝试通过VSTS发布构建时,会引发如下错误,并且构建失败.

To generate builds to testers we use VSTS in our project. When we checkout and run the branch in our mac with xcode, it works fine. But when i try to release a build through VSTS it throws error as below and the build fails.

ld:无法重新解析位码束中的目标文件:无效的位码 版本(生产者:"902.0.39.2_0"阅读器:"900.0.39.2_0")",使用 libLTO版本'LLVM版本9.0.0,(clang-900.0.39.2)' 架构arm64

ld: could not reparse object file in bitcode bundle: 'Invalid bitcode version (Producer: '902.0.39.2_0' Reader: '900.0.39.2_0')', using libLTO version 'LLVM version 9.0.0, (clang-900.0.39.2)' for architecture arm64

我知道该问题可能是由于存在两个不同版本的编译器而引起的.我正在使用Xcode 9.2,构建要上传的源代码的服务器也有Xcode 9.2.还有一件事是,过去我已经将Beta Xcode版本9.4提交到了分支.会造成问题吗?还是我在这里遗漏了其他东西?

I understand that the issue might be because of the fact that there are two different versions of the compiler hanging around. I am using Xcode 9.2 and the server which builds the source code to upload also has Xcode 9.2. One more thing is, in past i have made a commit with beta Xcode version 9.4 to the branch. Can that create an issue or is it something else that i am missing here.

我也从一些堆栈溢出和git的建议中听到,更新Xcode将解决此问题.我对此表示满意,但最后要保留该选项,因为在服务器中有一些服务器和内部版本已排队,例如android和WebApp内部版本,我们已通过VSTS对其进行了自动化,并将暂时停止运行.

Also i hear from some stack-overflow and git suggestions that updating Xcode will fix the issue. I am fine with that but want to have that option as last because there are some servers and builds queued in the server like android and WebApp build which we have automated through VSTS which will be stopped momentarily.

非常感谢任何帮助或指针.

Any help or pointers are much appreciated.

注意:VSTS服务器在内部尝试存档构建.因此,

Note: Internally the VSTS server tries to archive the build. So the accepted answer in error: Invalid bitcode version (Producer: '800.0.35.0_0' Reader: '703.0.31_0') might provide the solution. But still the scenario is different as VSTS might try something different under the hood.

推荐答案

当我尝试创建具有二进制框架(在我的情况下为Crashlytics/Fabric)的项目的归档文件时,发生了这件事.该框架是使用Xcode 9.4编译的,但我使用的是Xcode 9.2(看起来像900.0.39.2_0是Xcode 9.2,而902.0.39.2_0是Xcode 9.4).我通过在构建设置中将启用位码临时设置为解决了该问题.

It happened to me when I was trying to create an archive of a project with a binary framework (in my case Crashlytics/Fabric). The framework was compiled using Xcode 9.4, but I was using Xcode 9.2 (looks like 900.0.39.2_0 is Xcode 9.2 and 902.0.39.2_0 is Xcode 9.4). I solved it by temporarily setting Enable Bitcode to No in Build Settings.

注意:位代码对于将iOS应用提交到App Store不是必需的. (但是,对于Apple Watch应用程序是强制性的.)

Note: Bitcode is not mandatory to submit an iOS app to the App Store. (However it is mandatory for Apple Watch apps.)

另一种解决方案是将二进制框架降级到较旧的版本(使用兼容的Xcode版本构建).

Another solution would be to downgrade the binary framework to an older version (built with a compatible version of Xcode).

这篇关于VSTS Build Generation抛出无效的位码版本错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆