7

我收到一个错误,无法读取数据,因为它的格式不正确。现在我正在快速制作 iPhone 应用程序。我在我的应用程序的 Info.plist 中添加了几个代码,我删除了这些代码。但是当我想打开我的应用程序的 Info.plist 时,会发生这个错误。我不知道为什么,因为我删除了我添加的所有代码。我认为格式确实是固定的。我的 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>UILaunchStoryboardName</key>
    <key>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</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.0</string>
    <key>CFBundleVersion</key>
    <string>1</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIMainStoryboardFile</key>
    <string>Main</string>
    <key>UIRequiredDeviceCapabilities</key>
    <array>
        <string>armv7</string>
    </array>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
</dict>
</plist>

我怎样才能解决这个问题?

4

3 回答 3

4

您在 info.plist 文件中复制了密钥,在开头删除以下密钥

<key>UILaunchStoryboardName</key>

它会解决这个问题。

于 2017-02-26T14:27:10.250 回答
1

Try something below:

Right click on Info.plist -> Source Code -> Discard Change
于 2020-07-29T02:25:44.623 回答
0

我正在构建颤振项目,并且<string>关键 io.flutter.embedded_views_preview缺少问题 添加 <string></string>修复了我的问题,我没有更新 info.plist 尽管它是由颤振创建的,希望这对使用颤振的人有所帮助

于 2020-01-11T23:31:05.123 回答