我在尝试构建Xcode时遇到了这个错误。我尝试删除派生数据并重新启动Xcode,但没有任何帮助。
ld: framework not found Flutter
clang: error: linker command failed with exit code 1 (use -v to see invocation)
以下是完整的错误日志:
Ld /Users/chaythanyanair/Library/Developer/Xcode/DerivedData/Runner-efsxwbzqcezyswaezzytcnxazinn/Build/Products/Debug-iphonesimulator/Runner.app/Runner normal x86_64
cd /Users/chaythanyanair/Documents/Qburst/Learn/flutter_poc/ios
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk -L/Users/chaythanyanair/Library/Developer/Xcode/DerivedData/Runner-efsxwbzqcezyswaezzytcnxazinn/Build/Products/Debug-iphonesimulator -L/Users/chaythanyanair/Documents/Qburst/Learn/flutter_poc/ios/Pods/EstimoteSDK -L/Users/chaythanyanair/Library/Developer/Xcode/DerivedData/Runner-efsxwbzqcezyswaezzytcnxazinn/Build/Products/Debug-iphonesimulator/Alamofire -L/Users/chaythanyanair/Library/Developer/Xcode/DerivedData/Runner-efsxwbzqcezyswaezzytcnxazinn/Build/Products/Debug-iphonesimulator/SwiftKeychainWrapper -L/Users/chaythanyanair/Library/Developer/Xcode/DerivedData/Runner-efsxwbzqcezyswaezzytcnxazinn/Build/Products/Debug-iphonesimulator/device_info -L/Users/chaythanyanair/Library/Developer/Xcode/DerivedData/Runner-efsxwbzqcezyswaezzytcnxazinn/Build/Products/Debug-iphonesimulator/flutter_secure_storage -L/Users/chaythanyanair/Library/Developer/Xcode/DerivedData/Runner-efsxwbzqcezyswaezzytcnxazinn/Build/Products/Debug-iphonesimulator/shared_preferences -L/Users/chaythanyanair/Documents/Qburst/Learn/flutter_poc/ios/Flutter -F/Users/chaythanyanair/Library/Developer/Xcode/DerivedData/Runner-efsxwbzqcezyswaezzytcnxazinn/Build/Products/Debug-iphonesimulator -F/Users/chaythanyanair/Documents/Qburst/Learn/flutter_poc/ios/Pods/EstimoteSDK/EstimoteSDK -F/Users/chaythanyanair/Documents/Qburst/Learn/flutter_poc/ios/Pods/../../../../flutter/flutter/bin/cache/artifacts/engine/ios -F/Users/chaythanyanair/Documents/Qburst/Learn/flutter_poc/ios/Flutter -filelist /Users/chaythanyanair/Library/Developer/Xcode/DerivedData/Runner-efsxwbzqcezyswaezzytcnxazinn/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Objects-normal/x86_64/Runner.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=8.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/chaythanyanair/Library/Developer/Xcode/DerivedData/Runner-efsxwbzqcezyswaezzytcnxazinn/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Objects-normal/x86_64/Runner_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/chaythanyanair/Library/Developer/Xcode/DerivedData/Runner-efsxwbzqcezyswaezzytcnxazinn/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Objects-normal/x86_64/Runner.swiftmodule -ObjC -lAlamofire -lSwiftKeychainWrapper -ldevice_info -lflutter_secure_storage -lshared_preferences -framework CoreBluetooth -framework CoreLocation -framework EstimoteSDK -framework Flutter -framework Foundation -framework MobileCoreServices -framework SystemConfiguration -framework UIKit -ObjC -lAlamofire -lSwiftKeychainWrapper -ldevice_info -lflutter_secure_storage -lshared_preferences -framework CoreBluetooth -framework CoreLocation -framework EstimoteSDK -framework Flutter -framework Foundation -framework MobileCoreServices -framework SystemConfiguration -framework UIKit -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/chaythanyanair/Library/Developer/Xcode/DerivedData/Runner-efsxwbzqcezyswaezzytcnxazinn/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Runner.app.xcent -lPods-Runner -Xlinker -dependency_info -Xlinker /Users/chaythanyanair/Library/Developer/Xcode/DerivedData/Runner-efsxwbzqcezyswaezzytcnxazinn/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Objects-normal/x86_64/Runner_dependency_info.dat -o /Users/chaythanyanair/Library/Developer/Xcode/DerivedData/Runner-efsxwbzqcezyswaezzytcnxazinn/Build/Products/Debug-iphonesimulator/Runner.app/Runner
如何解决此问题?
4条答案
按热度按时间5f0d552i1#
我换到主频道。
然后运行
ukxgm1gy2#
对于2020年来这里的人来说,我遇到了这个问题,运行了上面答案中的命令(
flutter channel master
,flutter upgrade
),然后被要求手动迁移我的Xcode项目,以便仍然可以使用新版本的Flutter。https://flutter.dev/docs/development/ios-project-migration。希望能对某些人有所帮助。oxiaedzo3#
以下是对我有效的方法:
flutter create .
然后在Android Studio中尝试
flutter run
或按播放。4xy9mtcn4#
请尝试以下命令: