我正在使用Android Studio在Mac上测试我的Ffltter应用程序.Xcode已经安装,我让iOS模拟器在那里工作.Android Studio可以看到iOS设备.我将XCode指向我的项目中的iOS文件夹,但当我运行应用程序时,它失败了,报告Info.plist不包含有效的CFBundleVersion.
当我try 在XCode中打开Info.plist文件时,我收到错误消息"无法打开属性列表:第1行的格式错误的数据字节组;无效十六进制"
问题可能是我在Windows上编写了代码,然后从Git下载到我的Mac上,所以字符格式不同吗?
在下面找到plist.info文件的内容.
Android Studio版本:长颈鹿(2022.3.1) Xcode版本:15
<?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>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Gm Firebase</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>gm_firebase</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>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
<key>CFBundleLocalizations</key>
<array>
<string>en</string>
<string>es</string>
</array>
</plist>
以下是构建错误:
Xcode构建完成.41.7s 无法在17A66106-BEA8-4F34-A75B-FE17E43E82A2上安装/Users/test/StudioProjects/gm_firebase/build/ios/iphonesimulator/Runner.app.这有时是由格式错误的plist文件引起的: ProcessException:进程异常退出: 处理命令时遇到错误(DOMAIN=NSPOSIXErrorDOMAIN,代码=22): 模拟器设备为请求的操作返回错误. 应用程序的Info.plist不包含有效的CFBundleVersion. 确保Bundle 包包含有效的CFBundleVersion. 潜在错误(DOMAIN=NSPOSIXErrorDOMAIN,代码=22): 无法安装请求的应用程序 应用程序的Info.plist不包含有效的CFBundleVersion. 命令:/usr/bin/Arch-arm64e xcrun Simctl Install 17A66106-BEA8-4F34-A75B-FE17E43E82A2/Users/test/StudioProjects/gm_firebase/build/ios/iphonesimulator/Runner.app 在iPhone 15上启动应用程序时出错.
我不确定这是否相关,但Flutter/Release.xcconfig和Flutter/Release.xcconfig文件似乎也有格式问题.当我try 将文件提交到Git时,我看到了这一点: