抖动运行,IOS中的依赖项

时间:2020-05-01 18:00:35

标签: flutter

我尝试创建一个Flutter应用程序。我开始在ubuntu中创建Android项目,效果很好。但是随后我将该项目移植到MacOS(更新系统10.15.4和Xcode 11.4.1)中,然后我将错误编译到一个真正的IOS设备中。

这是我的输出:

frederikfrnadsen@demos-MBP barcode $ flutter run
Launching lib/main.dart on iPhone in debug mode...
Found saved certificate choice "iPhone Developer: Frederik Frandsen (W5W828HUYY)". To clear, use "flutter config".
Signing iOS app for device deployment using developer identity: "iPhone Developer: Frederik Frandsen (W5W828HUYY)"
Running pod install...                                              1,7s
Running Xcode build...                                                  

Xcode build done.                                           17,6s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    /Users/frederikfrnadsen/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_barcode_scanner-0.1.7/ios/Classes/FlutterBarcodeScannerPlugin.m:2:9: fatal error:
    'flutter_barcode_scanner/flutter_barcode_scanner-Swift.h' file not found
    #import <flutter_barcode_scanner/flutter_barcode_scanner-Swift.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

Could not build the precompiled application for the device.

Error launching application on iPhone.

感谢您的时间!

1 个答案:

答案 0 :(得分:0)

尝试:(rm -rf ios / Flutter / App.framework)

对我有用!