我创建了一个示例项目,并成功地在两个平台上运行。但我已经更新了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。我试过pod deintegrated
和pod install
,但仍然不工作。
感谢是前进。
3条答案
按热度按时间u59ebvdq1#
您需要根据您的iOS部署目标和flutter SDK版本升级包。
然后尝试下面的步骤。
1.运行
flutter clean
1.运行
flutter pub get
1.删除xcode派生数据-check this link
1.从项目iOS文件夹中删除Pods文件夹。
1.删除Podfile。从项目iOS文件夹锁定文件。
1.删除项目。工作区文件
1.在iOS平台上再次运行。
rqmkfv5c2#
也面临着同样的问题,我所做的是卸载flutter并重新安装https://docs.flutter.dev/get-started/install
dldeef673#
重新安装flutter为我解决了问题。
我正在使用fvm和有一个项目使用flutter 3。3.4.构建项目时
我得到了:
重新安装flutter后,项目构建没有错误。