ios - 在 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>
解决方案
推荐阅读
- rust - 在两个哈希图之间交换特征
- kubernetes - 如何在入口配置片段中获取请求 URI?
- amazon-web-services - 如何在 serverless.yml 文件中引用函数 (Lambda) 的函数 ARN?
- c++ - 构造函数的部分模板特化
- java - @GeneratedValue(strategy = GenerationType.AUTO):MySQL 和生成的 ID 在表之间共享?
- python - 在 Python 中拟合随机曲线
- sql - ORACLE 数据库如何将 DATE 隐式转换为 NUMBER?
- python - UnicodeDecodeError 或无法识别的结果
- node.js - 部署 Angular 9 应用程序
- jquery-ui - 为表中的每一行创建 jQuery ui 对话框