ios xcrun:错误:无法找到实用程序“PackageApplication”,不是开发人员工具或在 PATH 中 - 自从更新 Xcode
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/43068608/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH - Since updating Xcode
提问by Lovelock
Updated Xcode this morning and now ionic project wont deploy to a device.
今天早上更新了 Xcode,现在 ionic 项目不会部署到设备上。
ionic run ios --device
Returns:
返回:
** BUILD SUCCEEDED **
xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH
Error: Error code 72 for command: xcrun with args: -sdk,iphoneos,PackageApplication,-v
No idea what to do to fix, Googling returns lots of options but none correct.
不知道如何修复,谷歌搜索返回了很多选项,但没有一个是正确的。
回答by AnhSirk Dasarp
Cordova is trying to use PackageApplication
tool. But it was removed since Xcode 8.3. ( Thanks @guyromb for this)
Cordova 正在尝试使用PackageApplication
工具。但它自Xcode 8.3起被删除。(为此感谢@guyromb )
For those who are coming from an error from Jenkins/fastlane here is a temporary fix till jenkins xcode plugin gives a fix on this
对于那些来自 Jenkins/fastlane 的错误的人,这里是一个临时修复,直到 jenkins xcode 插件对此进行修复
If you have Xcode 8.2.1 or any version below 8.3, copy PackageApplication
script from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
如果您有 Xcode 8.2.1 或任何低于 8.3 的版本,请PackageApplication
从
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
OR you can Download from this link - https://gist.github.com/anonymous/48f3e4c5ae25313dc0fe10d9ec50c3fc
或者您可以从此链接下载 - https://gist.github.com/anonymous/48f3e4c5ae25313dc0fe10d9ec50c3fc
Go to finder -
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
转到查找器 -
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
paste the copied/downloaded above file here.
将上面复制/下载的文件粘贴到此处。
回答by guyromb
Cordova is trying to use "PackageApplication" tool. But it was removed since Xcode 8.3. Either downgrade Xcode or wait for Cordova to have a fix for that.
Cordova 正在尝试使用“PackageApplication”工具。但它自 Xcode 8.3 起被删除。要么降级 Xcode,要么等待 Cordova 对此进行修复。
回答by blahartinger
Linked in the Jenkins issue that matson kepson mentioned here there was a guy who attempted a PR to fix the issue. There was some unfinished change requests in his PR and I also found a few null ptrs in his changes. I forked his pr and fixed these things hereand there is now a snapshot linked herethat you can download and become unblocked until such a change is merged into the full build.
链接到 matson kepson 在这里提到的 Jenkins 问题,有一个人试图通过 PR 来解决这个问题。他的 PR 中有一些未完成的更改请求,我还在他的更改中发现了一些空的 ptr。我分叉他的公关和固定这些东西在这里,现在有链接的快照在这里,您可以下载,直到这种变化被合并到全力打造成为畅通。
回答by jpmcc
I've just come across this and my solution was to remove the iOS platform from the project:
我刚刚遇到这个问题,我的解决方案是从项目中删除 iOS 平台:
ionic platform rm ios
Then add it back in again
然后再次添加它
ionic platform add ios
I needed to run an initial build for it to fail with no signing set, so opening up the project in Xcode to just fix that. After that, building via the ionic cli worked as expected. I am guessing that re-adding the platform pulled in a new version of cordova-ios.
我需要运行一个初始构建以使其在没有签名集的情况下失败,因此在 Xcode 中打开该项目以解决该问题。之后,通过 ionic cli 构建按预期工作。我猜测重新添加平台会引入新版本的cordova-ios。
Update: I had only started on this project and created the base project from the blanktemplate. I have Xcode 8.3.1 installed and using Ionic 3(still with the --v2 switch with ionic cli).
更新:我刚刚开始这个项目,并从空白模板创建了基础项目。我安装了 Xcode 8.3.1 并使用了Ionic 3(仍然使用带有 ionic cli 的 --v2 开关)。
回答by matson kepson
Hi its official Bug from jenkins
嗨,詹金斯的官方错误
here you have a fresh status
在这里你有一个新的状态
https://issues.jenkins-ci.org/browse/JENKINS-43163
https://issues.jenkins-ci.org/browse/JENKINS-43163
Little bit clearer to look at this:
看这个更清楚一点:
http://subathrathanabalan.com/2016/01/07/building-ipa-export-archive/
http://subathrathanabalan.com/2016/01/07/building-ipa-export-archive/
回答by liuxing
I used shenzhenthis automatic procedure encountered a similar problem, and finally in accordance with the github Pull Request to solve my problem, hope for your reference! https://github.com/nomad/shenzhen/pull/347
我用shenzhen这个自动程序遇到了类似的问题,最后按照github的Pull Request解决了我的问题,希望大家参考! https://github.com/nomad/shenzhen/pull/347
回答by Fabio Godoy
I found a workaround to solve this using command line, with device connected on your mac: ionic build ios --device ios-deploy --noninteractive --debug --bundle build/device/YOURAPP.app
我找到了一种使用命令行解决此问题的解决方法,在您的 Mac 上连接设备: ionic build ios --device ios-deploy --noninteractive --debug --bundle build/device/YOURAPP.app
After this, stop debug using Ctrl C, and your app will be working on your device.
在此之后,使用 Ctrl C 停止调试,您的应用程序将在您的设备上运行。
Hope work for you guys.
希望对你们有用。
回答by S. Roose
The is caused by the deprecated PackageApplication. If you're using the remotebuild tool to run from Windows, it will be solved when the remotebuild bug has been fixed: https://github.com/Microsoft/remotebuild/issues/26
这是由已弃用的 PackageApplication 引起的。如果您使用 remotebuild 工具从 Windows 运行,则在修复 remotebuild 错误后将解决此问题:https: //github.com/Microsoft/remotebuild/issues/26
回答by Lentyai
回答by Julianesten
An option is open a .xcodeproj file located at platforms/iosand run the project directly from Xcode.
一个选项是打开位于平台/ios的 .xcodeproj 文件并直接从 Xcode 运行项目。