unity-game-engine - 使用 Jenkins Xcode 插件构建项目时出现异常

标签 unity-game-engine jenkins jenkins-plugins

我正在尝试使用 Jenkins 为我们的 Unity iOS build设置 CI。 xcworkspace 生成得很好,我可以使用 Xcode 的 UI 创建存档。

当我尝试使用 Jenkins 的 Xcode 插件进行构建时,构建失败。 我尝试创建一个虚拟项目,但遇到了同样的错误。插件文档和谷歌搜索并没有引导我到任何地方。

我查找了该插件的来源,但我不明白为什么它会损坏。我怀疑我遗漏了一些小东西,但无法识别它。

Working directory is /Users/Shared/Jenkins/Home/workspace/iOSTestApp.
Fetching marketing version number (CFBundleShortVersionString) from project.
[iOSTestApp] $ /usr/bin/agvtool mvers -terse1
No marketing version (CFBundleShortVersionString) found.
Marketing version (CFBundleShortVersionString) found in project configuration: 
Fetching technical version number (CFBundleVersion) from project.
[iOSTestApp] $ /usr/bin/agvtool vers -terse
No technical version found (CFBundleVersion)
Technical version (CFBundleVersion) found in project configuration: .
Marketing version (CFBundleShortVersionString) used by Jenkins to produce the IPA: 
Technical version (CFBundleVersion) used by Jenkins to produce the IPA: 
Read signing information from Xcode Project.
Read information from workspace Builds/iOS/Decisions/Unity-iPhone
ERROR: Build step failed with exception
java.lang.NullPointerException
at au.com.rayh.XCodeBuilder._perform(XCodeBuilder.java:1288)
at au.com.rayh.XCodeBuilder.perform(XCodeBuilder.java:1084)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
at hudson.model.Build$BuildExecution.build(Build.java:206)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1818)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step 'Xcode' marked build as failure

使用 代码:10.3 MacOS:10.14.6( Mojave ) Xcode插件2.0.12

SS1 SS2 SS3

最佳答案

我创建了以下 plist 并将其保存在我的桌面上

Plist information

然后我运行了以下 3 个命令

xcodebuild clean -workspace Unity-iPhone.xcworkspace -scheme Unity-iPhone
xcodebuild archive -workspace Unity-iPhone.xcworkspace -scheme Unity-iPhone archivePath Unity-iPhone.xcarchive 
xcodebuild -exportArchive -archivePath Unity-iPhone.xcarchive -exportPath BuildOut  -exportOptionsPlist ~/Desktop/iOSExportOptionsDebug.plist

关于unity-game-engine - 使用 Jenkins Xcode 插件构建项目时出现异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58061101/

相关文章:

unity-game-engine - 团结 : GetComponent<BaseClass<T>> - are there any workarounds for this?

shell - Jenkins Slave 打印消息 Cannot contact Slave-host : java. io.IOException : Remote call on Channel to/10. 0.2.2 failed

java - 只能导入一个类型。 <class> 解析为一个包

c++ - Jenkins 上的 Coverity 有什么替代品吗?

jenkins - 如何创建一个无法直接调用而只能从另一个作业调用的 "private"Jenkins 作业?

jenkins - 限制 Jenkins 管道仅在特定节点上运行

c# - Unity RewardAd 函数调用更多次而不仅仅是一次

android - Unity HTML5(WebGL) 导出的项目无法在手机/平板电脑上运行

c# - OnTriggerEnter 在意外对象上被调用

Jenkins Pipeline sh 显示名称/标签