Xcode中的XCBUtil.PropertyListConversionError

Tam*_*gel 1 xcode plist

当我尝试运行我的项目时,我收到此错误,指向我的本地化.strings文件:

错误的屏幕截图.

读取失败:无法完成操作.(XCBUtil.PropertyListConversionError错误1.)

我该怎么做才能解决这个问题?

Tam*_*gel 13

错误指向的.string文件中存在格式错误.可本地化的.strings文件应包含引号中的字符串(如果它们包含多个单词和/或特殊字符)和行尾的分号,如下所示:

string = translation;
"another string" = "another translation";
Run Code Online (Sandbox Code Playgroud)

请参阅此解决方案以查找错误.

你应该执行

/usr/bin/plutil -lint <path to .strings file>
Run Code Online (Sandbox Code Playgroud)

在终端找到确切的问题.

  • 我爱你。嫁给我! (2认同)

Sha*_*ngh 10

就我而言,我忘记解决 info.plist 中的冲突。


NSu*_*jit 5

当您的 info.plist 文件结构错误时,这种情况很常见。