Xcode build is missing expected TARGET_BUILD_DIR build setting
2,107
I just ran into this and fixed it as follows:
- run command
flutter upgrade
- run command
flutter clean
- run command
flutter pub get
if you have missing dependencies - attach phone
- run command
flutter run
If it still fails, open the Xcode runner project, set your development team and run it directly from there.
After it runs, close Xcode, do a clean build, and run it using your preferred approach.
Author by
K'man Amuda Jr.
Updated on January 01, 2023Comments
-
K'man Amuda Jr. over 1 year
I face error while launching on device
on iPhone 12 Pro Max
. This is console logLaunching lib/main.dart on iPhone 12 Pro Max in `debug mode` Running Xcode build... Xcode build done. 270.9s Xcode build is missing expected TARGET_BUILD_DIR build setting. Could not build the application for the simulator. Error launching application on iPhone 12 Pro Max.
-
SwiftiSwift over 2 yearsNo need to call flutter upgrade in my case.
-
Mohamed Saheed Mohamed Riswan about 2 yearsIn my case, After running flutter clean, dependencies were missing so need to run "flutter pub get"
-
brindy almost 2 yearsThanks @MohamedSaheedMohamedRiswan - have added that to the answer