1、當(dāng)誤刪某個flutter操作文件時,運行報錯如下
The 'Pods-Runner' target has transitive dependencies that include
statically linked binaries:
(/Users/me/works/flutter_app/test_app/ios/Flutter/Flut
ter.framework)
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/xcode/
target_validator.rb:84:in block (2 levels) in verify_no_static_framework_transitive_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/xcode/ target_validator.rb:74:ineach_key'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/xcode/
target_validator.rb:74:in block in verify_no_static_framework_transitive_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/xcode/ target_validator.rb:73:ineach'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/xcode/
target_validator.rb:73:in
verify_no_static_framework_transitive_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/xcode/ target_validator.rb:38:invalidate!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:590
:in validate_targets' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:158 :ininstall!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command/install.
rb:52:in run' /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:inrun'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:52:in
run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/bin/pod:55:in<top
(required)>'
/usr/local/bin/pod:23:in load' /usr/local/bin/pod:23:in<main>’
從網(wǎng)上搜了各種解決方法試了之后都不行,最終通過重新安裝cocoapods
安裝步驟:
1.執(zhí)行:which pod
作用:找出目前版本的pod路徑
2.rm -rf /usr/local/bin/pod
作用:其中/usr/local/bin/pod為上一步驟返回的路徑值
3.sudo gem install cocoapods
作用:重新下載安裝cocoapods
2、蘋果機安裝報detached HEAD!
WechatIMG3.jpeg
解決方法:
執(zhí)行如下命令
flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec
然后重新flutter run就可以啦