【问题标题】:Flutter error when trying to run IOS Emulator with Firestore尝试使用 Firestore 运行 IOS 模拟器时出现颤振错误
【发布时间】:2021-09-05 07:30:13
【问题描述】:

我一直试图在我的 Macbook 2015 上的 IOS 模拟器上运行我的应用程序,每次我将 firestorm 的库添加到我的应用程序时似乎都会出错。我需要这个库,因为我的数据库位于 google Firestore 网站上。

Launching lib/main.dart on iPhone 12 Pro in debug mode...
Running pod install...
Running Xcode build...
Xcode build done.                                           84.3s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    warning: [CP] Unable to find matching .xcframework slice in '/Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/FirebaseFirestore/FirebaseFirestore/abseil.xcframework abseil framework ios-i386_x86_64-simulator ios-armv7_arm64 ios-x86_64-maccatalyst' for the current build architectures (arm64 x86_64 i386).
    warning: [CP] Unable to find matching .xcframework slice in '/Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/FirebaseFirestore/FirebaseFirestore/BoringSSL-GRPC.xcframework BoringSSL-GRPC framework ios-armv7_arm64 ios-i386_x86_64-simulator ios-x86_64-maccatalyst' for the current build architectures (arm64 x86_64 i386).
    warning: [CP] Unable to find matching .xcframework slice in '/Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/FirebaseFirestore/FirebaseFirestore/FirebaseFirestore.xcframework FirebaseFirestore framework ios-i386_x86_64-simulator ios-armv7_arm64 ios-x86_64-maccatalyst' for the current build architectures (arm64 x86_64 i386).
    warning: [CP] Unable to find matching .xcframework slice in '/Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/FirebaseFirestore/FirebaseFirestore/gRPC-C++.xcframework gRPC-C++ framework ios-armv7_arm64 ios-i386_x86_64-simulator ios-x86_64-maccatalyst' for the current build architectures (arm64 x86_64 i386).
    warning: [CP] Unable to find matching .xcframework slice in '/Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/FirebaseFirestore/FirebaseFirestore/gRPC-Core.xcframework gRPC-Core framework ios-i386_x86_64-simulator ios-armv7_arm64 ios-x86_64-maccatalyst' for the current build architectures (arm64 x86_64 i386).
    warning: [CP] Unable to find matching .xcframework slice in '/Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/FirebaseFirestore/FirebaseFirestore/leveldb-library.xcframework leveldb-library framework ios-i386_x86_64-simulator ios-x86_64-maccatalyst ios-armv7_arm64' for the current build architectures (arm64 x86_64 i386).
    /Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/GoogleUtilities/GoogleUtilities/Logger/GULLogger.m:130:20: warning: this old-style function definition is not preceded by a prototype [-Wstrict-prototypes]
    void GULResetLogger() {
                       ^
    /Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/GoogleUtilities/GoogleUtilities/Logger/GULLogger.m:135:29: warning: this old-style function definition is not preceded by a prototype [-Wstrict-prototypes]
    aslclient getGULLoggerClient() {
                                ^
    /Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/GoogleUtilities/GoogleUtilities/Logger/GULLogger.m:139:35: warning: this old-style function definition is not preceded by a prototype [-Wstrict-prototypes]
    dispatch_queue_t getGULClientQueue() {
                                      ^
    /Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/GoogleUtilities/GoogleUtilities/Logger/GULLogger.m:143:27: warning: this old-style function definition is not preceded by a prototype [-Wstrict-prototypes]
    BOOL getGULLoggerDebugMode() {
                              ^
    4 warnings generated.
    /Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/GoogleUtilities/GoogleUtilities/Logger/GULLogger.m:130:20: warning: this old-style function definition is not preceded by a prototype [-Wstrict-prototypes]
    void GULResetLogger() {
                       ^
    /Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/GoogleUtilities/GoogleUtilities/Logger/GULLogger.m:135:29: warning: this old-style function definition is not preceded by a prototype [-Wstrict-prototypes]
    aslclient getGULLoggerClient() {
                                ^
    /Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/GoogleUtilities/GoogleUtilities/Logger/GULLogger.m:139:35: warning: this old-style function definition is not preceded by a prototype [-Wstrict-prototypes]
    dispatch_queue_t getGULClientQueue() {
                                      ^
    /Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/GoogleUtilities/GoogleUtilities/Logger/GULLogger.m:143:27: warning: this old-style function definition is not preceded by a prototype [-Wstrict-prototypes]
    BOOL getGULLoggerDebugMode() {
                              ^
    4 warnings generated.
    /Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/GoogleUtilities/GoogleUtilities/Logger/GULLogger.m:130:20: warning: this old-style function definition is not preceded by a prototype [-Wstrict-prototypes]
    void GULResetLogger() {
                       ^
    /Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/GoogleUtilities/GoogleUtilities/Logger/GULLogger.m:135:29: warning: this old-style function definition is not preceded by a prototype [-Wstrict-prototypes]
    aslclient getGULLoggerClient() {
                                ^
    /Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/GoogleUtilities/GoogleUtilities/Logger/GULLogger.m:139:35: warning: this old-style function definition is not preceded by a prototype [-Wstrict-prototypes]
    dispatch_queue_t getGULClientQueue() {
                                      ^
    /Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/GoogleUtilities/GoogleUtilities/Logger/GULLogger.m:143:27: warning: this old-style function definition is not preceded by a prototype [-Wstrict-prototypes]
    BOOL getGULLoggerDebugMode() {
                              ^
    4 warnings generated.
    2 warnings generated.
    /Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRLogger.m:61:28: warning: this old-style function definition is not preceded by a prototype [-Wstrict-prototypes]
    void FIRLoggerInitializeASL() {
                               ^
    /Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRLogger.m:104:20: warning: this old-style function definition is not preceded by a prototype [-Wstrict-prototypes]
    void FIRResetLogger() {
                       ^
    2 warnings generated.
    /Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRLogger.m:61:28: warning: this old-style function definition is not preceded by a prototype [-Wstrict-prototypes]
    void FIRLoggerInitializeASL() {
                               ^
    /Users/niltonsf/Desktop/App/loja_virtual_nnananene/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRLogger.m:104:20: warning: this old-style function definition is not preceded by a prototype [-Wstrict-prototypes]
    void FIRResetLogger() {
                       ^
    2 warnings generated.
    In file included from /Users/niltonsf/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_storage-3.1.6/ios/Classes/FLTFirebaseStoragePlugin.m:5:
    /Users/niltonsf/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_storage-3.1.6/ios/Classes/FLTFirebaseStoragePlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Analyzing workspace
    note: Constructing build description
    note: Build preparation complete
    warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the Runner editor. (in target 'Runner' from project 'Runner')

Could not build the application for the simulator.
Error launching application on iPhone 12 Pro.

这是我尝试启动时遇到的错误,有时启动应用程序需要 5m。

【问题讨论】:

标签: flutter


【解决方案1】:

我在 Firebase 中启动我的应用需要 15 分钟,

确保您已正确下载 CocoaPods 检查(How to install CocoaPods?

安装后在 Xcode 中打开您的项目并在产品选项卡中清理构建文件夹

在终端运行flutter clean

然后重新启动您的 IDE 并运行它!

当我遇到这个问题时,它对我有用。

【讨论】:

  • 我在将pods install : [!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target Runner` 设置为Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig 或在构建配置中包含Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig (Flutter/Release.xcconfig) 后收到此消息。`
  • 运行应用程序大约需要 20m
猜你喜欢
  • 1970-01-01
  • 2021-12-24
  • 2022-11-04
  • 2021-03-18
  • 2022-12-29
  • 2022-08-19
  • 2022-07-07
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多