扑 iOS "ld: framework not found Flutter"

Flutter iOS "ld: framework not found Flutter"

我已经创建了示例项目,并且在两个平台上都成功 运行ning。 但我已经更新了 android 工作室,然后在 iOS 应用程序停止工作后。我无法 运行 iOS 应用程序。这是我面临的日志。

    Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    ld: framework not found Flutter
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in parallel
    note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/gRPC-C++/gRPCCertificates-Cpp.bundle'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/sqflite/sqflite.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/fluttertoast/fluttertoast.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/firebase_storage/firebase_storage.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/firebase_core/firebase_core.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/flutter_facebook_auth/flutter_facebook_auth.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/firebase_auth/firebase_auth.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/cloud_firestore/cloud_firestore.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/Pods_Runner.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/GoogleUtilities/GoogleUtilities.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/GoogleDataTransport/GoogleDataTransport.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/gRPC-C++/grpcpp.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/FirebaseCoreDiagnostics/FirebaseCoreDiagnostics.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/gRPC-Core/grpc.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/FirebaseFirestore/FirebaseFirestore.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/FirebaseAuth/FirebaseAuth.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/FBSDKCoreKit_Basics/FBSDKCoreKit_Basics.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/path_provider_ios/path_provider_ios.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/Toast/Toast.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/PromisesObjC/FBLPromises.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/shared_preferences_ios/shared_preferences_ios.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/nanopb/nanopb.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/image_picker/image_picker.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/abseil/absl.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/leveldb-library/leveldb.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/FMDB/FMDB.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/GTMSessionFetcher/GTMSessionFetcher.framework'

note: Removed stale file '/Users/Rushabh/Library/Developer/Xcode/DerivedData/Runner-gtohejelopxdkkgekzyeqtnfiwjz/Build/Products/Debug-iphonesimulator/BoringSSL-GRPC/openssl_grpc.framework'

/Users/Rushabh/Documents/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'FMDB' from project 'Pods')
/Users/Rushabh/Documents/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'Toast' from project 'Pods')
/Users/Rushabh/Documents/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'BoringSSL-GRPC' from project 'Pods')
/Users/Rushabh/Documents/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'abseil' from project 'Pods')
/Users/Rushabh/Documents/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'leveldb-library' from project 'Pods')
/Users/Rushabh/Documents/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'gRPC-Core' from project 'Pods')
/Users/Rushabh/Documents/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'gRPC-C++' from project 'Pods')
/Users/Rushabh/Documents/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'gRPC-C++-gRPCCertificates-Cpp' from project 'Pods')

无法为模拟器构建应用程序。 在 iPhone 11.

上启动应用程序时出错

我正在使用 android studio 的 bumblebee 版本。 我试过 pod deintegratedpod install 但还是不行。

先谢谢了。

您需要根据您的 iOS 部署目标和 flutter sdk 版本升级包。

然后尝试以下步骤。

  1. 运行扑干净
  2. 运行 flutter pub get
  3. 删除 xcode 派生数据 - check this link
  4. 从项目 iOS 文件夹中删除 pods 文件夹。
  5. 从项目 iOS 文件夹中删除 pods.lock 文件。
  6. 删除 project.workspace 文件
  7. 运行 再次在 iOS 平台。

也遇到同样的问题,我把flutter卸载了再安装https://docs.flutter.dev/get-started/install