Xcode 中的 XCBUtil.PropertyListConversionError
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/46792197/
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
XCBUtil.PropertyListConversionError in Xcode
提问by Tamás Sengel
When I try to run my project, I get this error, pointing to my localized .strings file:
当我尝试运行我的项目时,我收到此错误,指向我本地化的 .strings 文件:
read failed: The operation couldn't be completed. (
XCBUtil.PropertyListConversionError
error 1.)
读取失败:操作无法完成。(
XCBUtil.PropertyListConversionError
错误1。)
What can I do to fix this issue?
我能做些什么来解决这个问题?
回答by Tamás Sengel
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 semicolonsat the end of lines, like such:
错误指向的 .string 文件中存在格式错误。可本地化的 .strings 文件应该在引号中包含字符串(如果它们包含多个单词和/或特殊字符)和行末的分号,例如:
string = translation;
"another string" = "another translation";
Please refer to this solutionto find the error.
请参阅此解决方案以查找错误。
You should execute
你应该执行
/usr/bin/plutil -lint <path to .strings file>
in Terminal to find the exact issue.
在终端中找到确切的问题。
回答by Shakti Pratap Singh
In my case, I had a conflict in info.plist which I forgot to resolve.
就我而言,我忘记解决 info.plist 中的冲突。
回答by NSurajit
This quite common when you have info.plist file with wrong structure.
当您的 info.plist 文件结构错误时,这很常见。