【发布时间】:2020-10-31 15:35:47
【问题描述】:
尝试在 Xcode 中构建 Flutter 应用时收到此错误消息:
ld: framework not found Flutter
clang: error: linker command failed with exit code 1 (use -v to see invocation)
在阅读出现类似错误的帖子时,建议的修复方法是将 Flutter.framework 文件添加到项目中,但是本指南中概述的步骤涉及删除此文件:
https://flutter.dev/docs/development/ios-project-migration
当我将App.framework 和Flutter.framework 文件添加回我的应用程序并尝试在VS Code 中使用flutter build ios 时,我收到一条错误消息,告诉我要迁移我的项目并带有指向上述指南的链接。所以看起来这两种解决方案都不起作用。
这是flutter doctor --v的输出:
[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.5 19F101, locale en-GB)
• Flutter version 1.17.5 at /Users/gregorysheen/Dev/flutter
• Framework revision 8af6b2f038 (10 days ago), 2020-06-30 12:53:55 -0700
• Engine revision ee76268252
• Dart version 2.8.4
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/gregorysheen/Library/Android/sdk
• Platform android-29, build-tools 29.0.2
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.5, Build version 11E608c
• CocoaPods version 1.9.3
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 42.1.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build
1.8.0_202-release-1483-b49-5587405)
[✓] VS Code (version 1.46.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.12.1
[!] Connected device
! No devices available
【问题讨论】:
标签: xcode flutter ios-simulator