1

我试图在 iphone 上测试我的项目(bulidbox 游戏),导出项目,在 xcode 上打开,当我尝试运行它时,出现错误,如下所示:

错误:无法解析“/project/ios/BBplayer/Info.plist”的内容:无法读取数据,因为它的格式不正确。

我查看了过去的 StackOverflow 问题,在相同的问题中发现了大约 7 个帖子,但仍然无法解决此问题

有什么办法可以解决这个问题吗?

xcode 10;

info.plist 文件的内容作为源代码打开

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDisplayName</key>
    <string>en</string>
    <string>Ring & Wall</string>
    <key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIconName</key>
    <string>AppIcon</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
    <string>armv7</string>
</array>
<key>UIRequiresFullScreen</key>
<true/>
<key>UIStatusBarHidden</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
4

2 回答 2

2

看起来您一直在尝试将 Info.plist 编辑为源代码。不。你不知道怎么做,你很可能会弄乱格式并破坏 Info.plist。

在这种情况下,您有两个错误:

<key>CFBundleDisplayName</key>
<string>en</string>
<string>Ring & Wall</string>

1

<string>一个条目后面不能有两个条目<key>

2

您不能在 XML 中使用 & 符号。你的意思是<string>Ring &amp; Wall</string>


我再说一遍,如果您只是将手从原始 XML 上移开并让 plist 编辑器完成它的工作,那么这一切都不会发生。

于 2019-07-24T15:14:57.303 回答
0

这一行的错误

<String>Ring & Wall</String>

删除 & 或更改线路 Ring & Wall

谢谢@matt

于 2019-07-24T16:54:14.497 回答