DEV Community

naoyashiga
naoyashiga

Posted on

Solution commands when Flutter build error happened

Check the error details

flutter run --verbose
Enter fullscreen mode Exit fullscreen mode

flutter clean

flutter clean
Enter fullscreen mode Exit fullscreen mode

Reinstall pod files

flutter clean
rm -rf ios/Pods
rm -rf ios/.symlinks
rm -rf ios/Flutter/Flutter.framework
rm -rf ios/Flutter/Flutter.podspec
rm ios/Podfile
Enter fullscreen mode Exit fullscreen mode

Update flutter

flutter upgrade
flutter clean
Enter fullscreen mode Exit fullscreen mode

Change flutter channel

flutter channel
flutter channel stable
flutter clean
Enter fullscreen mode Exit fullscreen mode

Clear Xcode cache

This is the solution about Xcode freeze.

rm -rf ~/Library/Caches/com.apple.dt.Xcode
Enter fullscreen mode Exit fullscreen mode

Remoce Derived Data

rm -rf ~/Library/Developer/Xcode/DerivedData/
Enter fullscreen mode Exit fullscreen mode

Remove cache by Xcode Tools

xcrun --kill-cache
Enter fullscreen mode Exit fullscreen mode

Remove the app and settings on simulator

xxcrun simctl erase all
Enter fullscreen mode Exit fullscreen mode

Remove CocoaPods cache

pod cache clean --all
Enter fullscreen mode Exit fullscreen mode

Update Cocoapods itself

If you need sudo permission, please use sudo.

[sudo] gem update cocoapods
Enter fullscreen mode Exit fullscreen mode

If you use old gem version, please update gem.

gem update --system
Enter fullscreen mode Exit fullscreen mode

Top comments (0)