Sta*_*ley 8 flutter flutter-ios
如何解决这个问题呢?Error (Xcode): Framework not found Flutter
我尝试了更多方法,
\n尝试删除 ios 然后 pod install...
\n试图扑干净...
\n尝试创建新项目等。
\n但还是无法解决。
\nLaunching lib/main.dart on iPhone 13 Pro Max in debug mode...\n/Users/pin-chientseng/Desktop/yomate/ios/Runner/Info.plist: Property List error: Found non-key inside <dict> at line 56 / JSON error:\nJSON text did not start with array or object and option to allow fragments not set. around line 1, column 0.\nXcode build done. 221.1s\nFailed to build iOS app\nError output from Xcode build:\n\xe2\x86\xb3\n ** BUILD FAILED **\n\n\nXcode\'s output:\n\xe2\x86\xb3\n Writing result bundle at path:\n /var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.hhxYin/flutter_ios_build_temp_dirsANWae/temporary_xcresult_bundle\n\n ld: framework not found Flutter\n clang: error: linker command failed with exit code 1 (use -v to see invocation)\n note: Using new build system\n note: Planning\n note: Build preparation complete\n note: Building targets in dependency order\n warning: Stale file \'/Users/pin-chientseng/Desktop/yomate/build/ios/Debug-iphonesimulator/Runner.app/GoogleService-Info.plist\' is\n located outside of the allowed root paths.\n\n note: Removed stale file\n \'/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner\n .build/Debug-iphonesimulator/Runner.build/InputFileList-5F0225AF943341352A9BA345-Pods-Runner-resources-Debug-input-files-37e3c74e\n 61b246db180ac6f1b6f5519a-resolved.xcfilelist\'\n\n note: Removed stale file\n \'/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner\n .build/Debug-iphonesimulator/Runner.build/InputFileList-678E497CE5823DAA4909D0F3-Pods-Runner-frameworks-Debug-input-files-6f17fb4\n 132a6c963427e5fd8c0f46475-resolved.xcfilelist\'\n\n note: Removed stale file\n \'/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner\n .build/Debug-iphonesimulator/Runner.build/OutputFileList-5F0225AF943341352A9BA345-Pods-Runner-resources-Debug-output-files-2b94b0\n 84fd7edee03f689887bc427bd3-resolved.xcfilelist\'\n\n note: Removed stale file\n \'/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner\n .build/Debug-iphonesimulator/Runner.build/OutputFileList-678E497CE5823DAA4909D0F3-Pods-Runner-frameworks-Debug-output-files-3dbe4\n 531b144e8e556eea6741f7e46e6-resolved.xcfilelist\'\n\n note: Removed stale file\n \'/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner\n .build/Debug-iphonesimulator/Runner.build/Script-5F0225AF943341352A9BA345.sh\'\n\n note: Removed stale file\n \'/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner\n .build/Debug-iphonesimulator/Runner.build/Script-678E497CE5823DAA4909D0F3.sh\'\n\n note: Removed stale file\n \'/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner\n .build/Debug-iphonesimulator/Runner.build/Script-69D48C77EE5D169DAA62588C.sh\'\n\n /Users/pin-chientseng/Desktop/yomate/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target\n \'IPHONEOS_DEPLOYMENT_TARGET\' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target\n \'FMDB\' from project \'Pods\')\n /Users/pin-chientseng/Desktop/yomate/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target\n \'IPHONEOS_DEPLOYMENT_TARGET\' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target\n \'leveldb-library\' from project \'Pods\')\n\n Result bundle written to path:\n /var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.hhxYin/flutter_ios_build_temp_dirsANWae/temporary_xcresult_bundle\n\n\nError (Xcode): Framework not found Flutter\n\n\nCould not build the application for the simulator.\nError launching application on iPhone 13 Pro Max.\nRun Code Online (Sandbox Code Playgroud)\n\n\n如果我使用这个方法,
\npost_install do |installer|\n installer.pods_project.targets.each do |target|\n target.build_configurations.each do |config|\n if Gem::Version.new(\'8.0\') > Gem::Version.new(config.build_settings[\'IPHONEOS_DEPLOYMENT_TARGET\'])\n config.build_settings[\'IPHONEOS_DEPLOYMENT_TARGET\'] = \'8.0\'\n end\n end\n end\nend\nRun Code Online (Sandbox Code Playgroud)\n我会收到这个错误...
\nLaunching lib/main.dart on iPhone 13 Pro Max in debug mode...\nRunning pod install... 38.2s\nRunning Xcode build... \nXcode build done. 28.7s\nFailed to build iOS app\nError output from Xcode build:\n\xe2\x86\xb3\n ** BUILD FAILED **\n\n\nXcode\'s output:\n\xe2\x86\xb3\n Writing result bundle at path:\n /var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.gk0YEl/flutter_ios_build_temp_dirWL743Q/temporary_xcresult_bundle\n\n /Users/pin-chientseng/Development/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_avfoundation-2.3.4/ios/Classes/messages\n .g.m:7:9: fatal error: \'Flutter/Flutter.h\' file not found\n #import <Flutter/Flutter.h>\n ^~~~~~~~~~~~~~~~~~~\n 1 error generated.\n note: Using new build system\n note: Planning\n note: Build preparation complete\n note: Building targets in dependency order\n\n Result bundle written to path:\n /var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.gk0YEl/flutter_ios_build_temp_dirWL743Q/temporary_xcresult_bundle\n\n\nLexical or Preprocessor Issue (Xcode): \'Flutter/Flutter.h\' file not found\n/Users/pin-chientseng/Development/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_avfoundation-2.3.4/ios/Classes/messages.g.m\n:6:8\n\n\nCould not build the application for the simulator.\nError launching application on iPhone 13 Pro Max.\nRun Code Online (Sandbox Code Playgroud)\n
小智 12
就我而言,我在尝试清理 258go macbook 上的一些存储以更新 Xcode 时删除 flutter 实例后遇到此错误:(,这样做时我可能删除了 flutter.framework。
这里给出的解决方案对我来说没有任何改变。
所以我尝试清理 pod 中的所有内容,包括缓存。pod install命令失败,因为缺少ios工具,可以通过flutter precache --ios下载。
所以为我解决这个问题的完整过程是:
cd ios
pod cache clean --all
rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods
rm -rf ~/Library/Developer/Xcode/DerivedData/*
pod deintegrate
flutter precache --ios
pod install
Run Code Online (Sandbox Code Playgroud)
我希望这个解决方案能够帮助某人并防止他们像我一样失去一整天的工作。
| 归档时间: |
|
| 查看次数: |
14678 次 |
| 最近记录: |