升级我的Flutter版本后,无法构建iOS应用

时间:2019-04-09 13:47:42

标签: 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)

1 个答案:

答案 0 :(得分:1)

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

如果这似乎不能解决问题,则others可以通过按自己的建议重新安装Flutter来解决此问题。