ios - 升级我的 flutter 版本后无法构建 iOS 应用程序

标签 ios flutter

我是 Flutter iOS 开发的新手 我已经升级了我的 Flutter 版本,然后在我的应用程序无法构建 iOS 应用程序后我得到了我在下面提到的这个异常,请帮助我。在此之前它工作正常我应该重新安装 flutter 或任何其他想法意味着很多,提前致谢

Xcode build done.                                           10.7s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **
Xcode's output:
↳
    === BUILD TARGET map_view OF PROJECT Pods WITH CONFIGURATION Debug ===
    /Users/harshavardhan/Workspace/fleetconnect_flutter/ios/Pods/FMDB/src/fmdb/FMDatabase.m:1486:15: warning: 'sqlite3_wal_checkpoint_v2' is only available on iOS 5.0 or newer [-Wunguarded-availability]
        int err = sqlite3_wal_checkpoint_v2(_db, dbName, checkpointMode, logFrameCount, checkpointCount);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~
    In module 'SQLite3' imported from /Users/harshavardhan/Workspace/fleetconnect_flutter/ios/Pods/FMDB/src/fmdb/FMDatabase.m:8:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/sqlite3.h:8244:16: note: 'sqlite3_wal_checkpoint_v2' has been explicitly marked partial here
    SQLITE_API int sqlite3_wal_checkpoint_v2(
                   ^
    /Users/harshavardhan/Workspace/fleetconnect_flutter/ios/Pods/FMDB/src/fmdb/FMDatabase.m:1486:15: note: enclose 'sqlite3_wal_checkpoint_v2' in an @available check to silence this warning
        int err = sqlite3_wal_checkpoint_v2(_db, dbName, checkpointMode, logFrameCount, checkpointCount);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~
    1 warning generated.
    === BUILD TARGET map_view OF PROJECT Pods WITH CONFIGURATION Debug ===
    /Users/harshavardhan/Workspace/fleetconnect_flutter/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.m:101:9: warning: 'dispatch_queue_set_specific' is only available on iOS 5.0 or newer [-Wunguarded-availability]
            dispatch_queue_set_specific(_queue, kDispatchQueueSpecificKey, (__bridge void *)self, NULL);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    In module 'Foundation' imported from /Users/harshavardhan/Workspace/fleetconnect_flutter/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.h:9:
    In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
    In module 'Dispatch' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:20:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/dispatch/queue.h:1352:1: note: 'dispatch_queue_set_specific' has been explicitly marked partial here
    dispatch_queue_set_specific(dispatch_queue_t queue, const void *key,
    ^
    /Users/harshavardhan/Workspace/fleetconnect_flutter/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.m:101:9: note: enclose 'dispatch_queue_set_specific' in an @available check to silence this warning
            dispatch_queue_set_specific(_queue, kDispatchQueueSpecificKey, (__bridge void *)self, NULL);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/harshavardhan/Workspace/fleetconnect_flutter/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.m:184:54: warning: 'dispatch_get_specific' is only available on iOS 5.0 or newer [-Wunguarded-availability]
        FMDatabaseQueue *currentSyncQueue = (__bridge id)dispatch_get_specific(kDispatchQueueSpecificKey);
                                                         ^~~~~~~~~~~~~~~~~~~~~
    In module 'Foundation' imported from /Users/harshavardhan/Workspace/fleetconnect_flutter/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.h:9:
    In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
    In module 'Dispatch' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:20:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/dispatch/queue.h:1408:1: note: 'dispatch_get_specific' has been explicitly marked partial here
    dispatch_get_specific(const void *key);
    ^
    /Users/harshavardhan/Workspace/fleetconnect_flutter/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.m:184:54: note: enclose 'dispatch_get_specific' in an @available check to silence this warning
        FMDatabaseQueue *currentSyncQueue = (__bridge id)dispatch_get_specific(kDispatchQueueSpecificKey);
                                                         ^~~~~~~~~~~~~~~~~~~~~
    2 warnings generated.
    /Users/harshavardhan/development/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-2.2.11/ios/Classes/FluttertoastPlugin.m:19:23: warning: unused variable 'viewController' [-Wunused-variable]
        UIViewController *viewController =
                          ^
    /Users/harshavardhan/development/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-2.2.11/ios/Classes/FluttertoastPlugin.m:48:19: warning: unused variable 'size' [-Wunused-variable]
            NSNumber *size = call.arguments[@"size"];
                      ^
    2 warnings generated.
    === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
    ld: framework not found Flutter
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
Could not build the application for the simulator.
Error launching application on iPhone XR.
Exited (sigterm)

最佳答案

尝试在终端中清理项目(Flutter clean),从ios 目录运行pod install,然后再次运行应用程序.

如果这似乎不能解决问题,others通过按照您自己的建议重新安装 Flutter,他们很幸运地解决了这个问题。

关于ios - 升级我的 flutter 版本后无法构建 iOS 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55594435/

相关文章:

ios - 启动屏幕不显示 Logo 图像

flutter - 解决后,Flutter/Dart将不会显示FutureBuilder快照

dart - 字符串不是 type.dart(not_a_type)

Flutter Dart 分析器未应用我的 linter 规则

ios - 如何在iOS应用程序中循环连续播放声音文件?

ios - 自定义 XIB 转换?

ios - if let variable - 使用未解析的标识符

ios - 迦太基错误 : No available version for binary

flutter - 如果我习惯用 Switch 小部件上的新 val 更改状态,如何使用函数回调?

Flutter - 如何管理一个文件中的 TextStyle 'text_style.dart' 函数以在另一个 View 中调用?