ios 为什么我的 ibtool 失败,退出代码为 255?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15422033/
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
Why am I getting ibtool failed with exit code 255?
提问by Darren
All of a sudden I can't build my project. I get the following compiler error:
突然间我无法构建我的项目。我收到以下编译器错误:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool failed with exit code 255
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool 失败,退出代码 255
I get this error for a whole bunch of my xib files. Any ideas what is happening, and what a solution is?
我的一大堆xib文件都收到了这个错误。任何想法发生了什么,什么是解决方案?
Using Xcode 4.6, iOS 6.1.
使用 Xcode 4.6,iOS 6.1。
回答by Jay Q.
I had something similar happen to me recently using Xcode 4.6 and iOS 6.1.
我最近在使用 Xcode 4.6 和 iOS 6.1 时遇到了类似的事情。
All I did was switch to a different device version (5.1) on the simulator and it ran. Switched back to 6.1 and it fixed itself.
我所做的只是在模拟器上切换到不同的设备版本 (5.1) 并运行。切换回 6.1 并自行修复。
Xcode can be unhelpful at times.
Xcode 有时可能无济于事。
回答by damithH
This happen to us and we clean cache, delete Derived data folder.. etc. nothing happen.
这发生在我们身上,我们清理缓存,删除派生数据文件夹......等等,什么也没发生。
below steps made it fix,
以下步骤使其修复,
- open xib(nib) as Source Code (Right click on the xib
Open As > Source Code
fromXcode
or open it usingTextEdit
) - remove this
appearanceType="aqua"
- save and open using Xcode
- 厦门国际银行开(NIB)的源代码(在厦门国际银行右键单击
Open As > Source Code
从Xcode
或打开它使用TextEdit
) - 删除这个
appearanceType="aqua"
- 使用 Xcode 保存并打开
For more explain use this article, it help us to fix the issue.
有关更多解释,请使用本文,它可以帮助我们解决问题。
回答by Undo
Try cleaning the app. Cmd-Shft-K.
尝试清理应用程序。Cmd-Shift-K。
回答by knagode
Try to find all XIB files in project and open it. One of them will most likely crash your Xcode.
尝试找到项目中的所有 XIB 文件并打开它。其中之一很可能会使您的 Xcode 崩溃。
My problem was custom fonts in some XIB file.
我的问题是某些 XIB 文件中的自定义字体。
I had to install missing fonts on my computer and problem was solved.
我不得不在我的电脑上安装缺少的字体,问题解决了。
回答by Vikram Belde
- Restart Xcode - Didn't Work
- Cleaning the App - Didn't Work
- Deleting the derivedData - Didn't Work
- Reset simulator content and settings - Didn't Work
- changing simulator versions - Didn't Work
- Restart the OS - Magically Works
- 重新启动 Xcode - 不起作用
- 清理应用程序 - 无效
- 删除派生数据 - 不起作用
- 重置模拟器内容和设置 - 无效
- 更改模拟器版本 - 不起作用
- 重新启动操作系统 - Magically Works
I'm not sure which part did the magic and yes it killed a lot of time.
我不确定哪个部分发挥了魔力,是的,它浪费了很多时间。
回答by Nirmal Subedi
In my case, I was working on Visual Studio. It was all good. All of a sudden, I got the same issue. Then I opened XCode, I saw the updates available. Then I Updated the Xcode updates. Then it worked :)
就我而言,我正在使用 Visual Studio。一切都很好。突然之间,我遇到了同样的问题。然后我打开 XCode,我看到了可用的更新。然后我更新了 Xcode 更新。然后它起作用了:)
So the reason was : XCode expected to complete some updates. Until that, It was not working properly.
所以原因是:XCode 期望完成一些更新。在此之前,它无法正常工作。
回答by ollie
What you should do if you're stuck is, in a shell: ibtool --warnings --errors --notices yourfile.xib > alerts.plist
如果你被卡住了,你应该做的是,在一个 shell 中: ibtool --warnings --errors --notices yourfile.xib > alerts.plist
which will crash, but now you have the crashlog, in my case it was an issue with simulated metrics:
这会崩溃,但现在您有了崩溃日志,在我的情况下,这是模拟指标的问题:
localhost:Classes me$ ibtool --warnings --errors --notices CodeViewController.xib > alerts.plist 2014-04-25 17:40:48.625 ibtoold[11691:507] [MT] DVTAssertions: ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilderCocoaTouch/IDEInterfaceBuilderCocoaTouch-5038/InterfaceBuilder/WidgetIntegration/SimulatedMetrics/IBUISimulatedSizeMetrics.m:33 Details: (initialTargetRuntime) should not be nil. Object: Method: -initWithTargetRuntime: Thread: {name = (null), num = 1} Hints: None
本地主机:Classes me$ ibtool --warnings --errors --notices CodeViewController.xib > alerts.plist 2014-04-25 17:40:48.625 ibtoold[11691:507] [MT] DVTAssertions:/SourceCoBuildercoIDE 中的断言失败/IDEInterfaceBuilderCocoaTouch-5038/InterfaceBuilder/WidgetIntegration/SimulatedMetrics/IBUISimulatedSizeMetrics.m:33 详细信息:(initialTargetRuntime)不应为零。对象:方法:-initWithTargetRuntime:线程:{name = (null), num = 1} 提示:无
So in my case I opened the xib as source via context menu and removed the metrics objects. It depends on the error what to remove or change. Try ibtool again and if it doesn't crash you're good.
因此,在我的情况下,我通过上下文菜单将 xib 作为源打开并删除了指标对象。这取决于要删除或更改的错误。再次尝试 ibtool,如果它没有崩溃,你就很好。
Background: The reason for this error is generic, it can always happen with different specs changing from iOS xcode version to version, mostly if you haven't checked your projects periodically with xcode updates.
背景:这个错误的原因是通用的,它总是会随着不同的规范从 iOS xcode 版本改变到版本而发生,主要是如果你没有定期检查你的项目并使用 xcode 更新。
回答by nenchev
I go this error, and after scanning the crash log I noticed out my Xcode-7 build was trying to use the build tools from Xcode-8 Beta. I had previously used xcode-selectto change the version of the build tools I wanted to use. If you have a xcode-beta install, check your settings using the commands below:
我出现了这个错误,在扫描崩溃日志后,我注意到我的 Xcode-7 构建试图使用来自 Xcode-8 Beta 的构建工具。我以前使用xcode-select来更改我想要使用的构建工具的版本。如果您安装了 xcode-beta,请使用以下命令检查您的设置:
Show which build tool path is set:
显示设置了哪个构建工具路径:
xcode-select -p
Select the standard Xcode path:
选择标准的 Xcode 路径:
sudo xcode-select -s /Applications/Xcode.app/
If you're trying to build with an Xcode at different installation path, be sure the path above reflects that.
如果您尝试使用不同安装路径的 Xcode 进行构建,请确保上面的路径反映了这一点。
回答by Logan
This will be irrelevant for those who had experienced the problem in the past... But with the WatchKit Framework, I had this error come up. All I did was delete a segue which I had linked between two WKInterface Controllers, and the build succeeded.
这对于那些过去遇到过这个问题的人来说无关紧要……但是使用 WatchKit 框架时,我出现了这个错误。我所做的只是删除我在两个 WKInterface 控制器之间链接的 segue,然后构建成功。
回答by CodeBender
Got this just now with XCode 8.3.
刚刚用 XCode 8.3 得到了这个。
For me, I just quit XCode, then cleaned the app and rebuilt. It was fine after that.
对我来说,我只是退出 XCode,然后清理应用程序并重新构建。之后就好了。
The cause for me was adding new string files for a localized storyboard.
我的原因是为本地化的故事板添加新的字符串文件。