【问题标题】:The data couldn’t be read because it isn’t in the correct format. error无法读取数据,因为它的格式不正确。错误
【发布时间】:2017-07-17 02:22:54
【问题描述】:

我遇到了一个错误, 无法读取数据,因为它的格式不正确。 现在我正在快速制作 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>

我该如何解决这个问题?

【问题讨论】:

    标签: ios xcode info-plist


    【解决方案1】:

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

    <key>UILaunchStoryboardName</key>
    

    它会解决问题。

    【讨论】:

    • @Idindu 给我错误 App/Info.plist':无法读取数据,因为它的格式不正确。 CFBundleURLSchemestwitterkit-X32etXSRAmuYhCboKPJWq8meMLSApplicationQueriesSchemestwitter字符串> twitterauth
    【解决方案2】:

    我正在构建颤振项目,问题缺少 &lt;string&gt;io.flutter.embedded_views_preview 添加 &lt;string&gt;&lt;/string&gt; 解决了我的问题,但我没有更新 info.plist是由颤振创建的,希望这对使用颤振的人有所帮助

    【讨论】:

      【解决方案3】:

      试试下面的东西:

      Right click on Info.plist -> Source Code -> Discard Change
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-10-15
        • 1970-01-01
        • 1970-01-01
        • 2019-07-28
        • 2018-04-06
        相关资源
        最近更新 更多