Xcode 中的 XCBUtil.PropertyListConversionError [英] XCBUtil.PropertyListConversionError in Xcode
问题描述
当我尝试运行我的项目时,我收到此错误,指向我本地化的 .strings 文件:
When I try to run my project, I get this error, pointing to my localized .strings file:
读取失败:操作无法完成.(XCBUtil.PropertyListConversionError
错误 1.)
read failed: The operation couldn’t be completed. (
XCBUtil.PropertyListConversionError
error 1.)
我该怎么做才能解决这个问题?
What can I do to fix this issue?
推荐答案
错误指向的 .string 文件中存在格式错误.可本地化的 .strings 文件应包含引号中的字符串(如果它们包含多个单词和/或特殊字符)和行尾的分号,例如:>
There is a formatting error inside the .string file that the error is pointing at. Localizable .strings files should contain strings in quotes (if they contain more than one word and/or special characters) and semicolons at the end of lines, like such:
string = translation;
"another string" = "another translation";
请参阅此解决方案以查找错误.
你应该执行
/usr/bin/plutil -lint <path to .strings file>
在终端中找到确切的问题.
in Terminal to find the exact issue.
这篇关于Xcode 中的 XCBUtil.PropertyListConversionError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!