“致命错误:找不到'src / core / lib / surface / event_string.h'文件” cloud_firestore抖动了吗?

时间:2019-04-23 18:44:21

标签: firebase flutter

在创建新的flutter应用程序并集成Cloud Firestore时,我似乎收到了此错误。

podfiles出现问题...我尝试了不同的flutter分支(master,dev,beta)。

cloud_firestore:^ 0.9.13 + 1包的文档似乎与Podfile的处理方面与firestore官方控制台上的文档不同。

有时错误是针对登录xcode和project_id的。即使重新开始,当我尝试集成Firestore时,应用程序也会因缺少此“ event_string.h”文件而中断。

Running Xcode build...
Xcode build done.                                           69.9s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    === BUILD TARGET gRPC-Core OF PROJECT Pods WITH CONFIGURATION Debug ===
    /Users/joey/Code/dart/spry_up/ios/Pods/gRPC-Core/src/core/lib/surface/completion_queue.cc:41:10: fatal error: 'src/core/lib/surface/event_string.h' file not found
    #include "src/core/lib/surface/event_string.h"
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.

Could not build the precompiled application for the device.

Error launching application on iPhone.

我不确定该去哪里寻求帮助。我已经对该应用程序进行了3次重建。

1 个答案:

答案 0 :(得分:0)

请尝试在Podfile代码中添加或编辑此编辑内容,并标记为“ ** ...... **”

target 'Runner' do
  ** use_frameworks!  **

..............

post_install do |installer|
      installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
          config.build_settings['ENABLE_BITCODE'] = 'NO'
          ** config.build_settings['SWIFT_VERSION'] = '4.0' **
        end
      end
    end

删除您的Podfile.lock,然后尝试