[Flutter/dart] Command PhaseScriptExecution failed with a nonzero exit code
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/hosted
Then install packages again.
flutter clean
flutter pub get
pod install
I built it again, I was able to build successfully.
Recent Posts
See AllWhat want to do There is an operation that operates on two-dimensional arrays There are multiple targets to be processed In this case, I...
What want to do As stated in the title, I would like to define an array of function pointers. Specifically, for example, the third...
Phenomenon There is an array Check whether the index variable is within the size of the array, and access the element only if it is...
Comments