首页 > 解决方案 > 在 MacOS 上构建颤振应用程序时遇到此错误:/Users/ggg/Runner/Info.plist:属性列表错误:

问题描述

我正在尝试构建我的颤振应用程序以在 ios 上工作。我来自 Windows 操作系统,一切都很好,但这是我尝试在 MacO 上运行应用程序时遇到的多个问题中的第一个。

/Users/ggg/Desktop/app/Runner/Info.plist:属性列表错误:在第 50 行遇到意外元素(plist 只能包含一个对象)/ JSON 错误:JSON 文本没有以数组或对象开头,并且选项允许片段未设置。在第 1 行第 0 列附近。

这是我的 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>NSLocationWhenInUseUsageDescription</key>
    <string>This app needs access to location when open.</string>
    <key>NSCameraUsageDescription</key>
    <string>This app needs access to camera when user prompts it.</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>This app needs access to photo library when user prompts it.</string>
    <key>CFBundleDevelopmentRegion</key>
    <string>$(DEVELOPMENT_LANGUAGE)</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>appname</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>$(FLUTTER_BUILD_NAME)</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>$(FLUTTER_BUILD_NUMBER)</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIMainStoryboardFile</key>
    <string>Main</string>
    <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>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>
</dict>
<key>NSAppTransportSecurity</key>
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-44919293838389292~763277283</string>
<key>SKAdNetworkItems</key>
  <array>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>cstr6.skadnetwork</string>
    </dict>
  </array>
<dict>
    <key>NSAllowsLocalNetworking</key>
    <true/>
</dict>
</plist>

标签: iosflutter

解决方案


推荐阅读