错误:无法将输入文件作为属性列表读取:操作无法完成。(XCBUtil.PropertyListConversionError 错误 1。)

Ric*_*ick 4 ios firebase flutter

我正在将 Firebase 集成到我的 Flutter 应用程序并为 iOS 进行设置。运行应用程序时,我不断收到此错误。

Failed to build iOS app
Error output from Xcode build:
?
    ** BUILD FAILED **


Xcode's output:
?
    error: unable to read input file as a property list: The operation couldn’t be
    completed. (XCBUtil.PropertyListConversionError error 1.) (in target 'Runner' from
    project 'Runner')
    note: Using new build system
    note: Planning build
    note: Constructing build description

Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
Run Code Online (Sandbox Code Playgroud)

我不确定是什么原因造成的...

Mic*_*ski 11

这表明文件有问题*.plist

是不是一个也没关系GoogleService-Info.plist。它可以是Info.plistor Info-Debug.plistor Info-Release.plist- 实际上.plist是 iOS 项目目录中的任何文件。

我建议打开Xcode,单击每个.plist文件并检查它是否可以正常打开。如果没有,IDE 会显示错误 - 可能是格式错误的.plist文件。


gul*_*yuz 9

我在新导入的 Flutter 项目中遇到了同样的问题。经过一些调试,问题似乎是由损坏的GoogleService-Info.plist文件引起的!不知道它为什么以及如何损坏,因为我新导入和现有项目。

要解决此问题,您可以按照以下步骤操作;

  • 在 XCode 中打开您的项目
  • 删除现有GoogleService-Info.plist文件
  • 从 Firebase 下载原始版本
  • 然后将此文件重新导入/重新复制到您的项目中

完成后,运行flutter clean然后尝试在 iOS 模拟器中运行它

这对我有用,希望它也能解决您的问题。