The source of my problem was that Flutter could not find the latest installed version of Xcode.
To fix it, go to Xcode->preferences->locations->set value for command Line tools.
The source of my problem was that Flutter could not find the latest installed version of Xcode.
To fix it, go to Xcode->preferences->locations->set value for command Line tools.