[Flutter/dart] Command PhaseScriptExecution failed with a nonzero exit code
- M.R

- Oct 10, 2021
- 1 min read
Phenomenon
Developing a Flutter project on Mac. After updating Flutter to 2.5.1, I get a title error in Xcode and can't build.
Cause and solution
The version of flutter_redux was old.
Looking back at the error log with Xcode, the following error seems to be the direct cause.
Try correcting the name to the name of an existing method, or defining a method named 'inheritFromWidgetOfExactType'.
This error seems to be due to inheritFromWidgetOfExactType being deprecated in the latest version (ref).
Going back further in the log, it seems that version 0.5.4 of flutter_redux occurred.
So update flutter_redux to the latest 0.8.2.
・・・However, a similar error occurred again. It seems that the package cache is left.
Therefore, delete the cache once.
First, delete the following folders
(* The path depends on the location where flutter is installed)
rm -r /Applications/flutter/.pub-cache/hostedThen install packages again.
flutter clean
flutter pub get
pod installI built it again, I was able to build successfully.






Comments