Build failed: Could not find an option named "track-widget-creation"
897
Fixed by a amending the xcode_backend.sh file.
$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh
local track_widget_creation_flag=""
if [[ -n "$TRACK_WIDGET_CREATION"
&& "${build_mode}" == "debug"
]]; then
track_widget_creation_flag="--track-widget-creation"
fi
Author by
yogi
Updated on December 10, 2022Comments
-
yogi over 1 year
I'm trying to build my project to deploy to TestFlight, but my build is failing whether using Xcode, terminal or vscode with the following error: Could not find an option named "track-widget-creation".
I have followed previous advice to fix this issue and unfortunately it doesn't work for me.
- flutter clean
- flutter build iOS --release
Xcode's output: ↳ === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Release === Could not find an option named "track-widget-creation".
Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options. Failed to build /Users/XXXXXX/Documents/Flutter/XXXXXX. Command /bin/sh failed with exit code 255
-
mirkancal about 5 yearsHave you check the issues on Github? There are other advices that you can try. github.com/flutter/flutter/issues/24239#issuecomment-460578875 github.com/flutter/flutter/issues/26279
-
yogi about 5 years@mirkancal Thank you for the link. This fixed my issue 👍
-
mirkancal about 5 yearsI'm glad. Do you mind answering your own question and explain what you've applied to fix it, to inform others that might face the same issue in the future?
-
Spyryto almost 5 years@mirkancal He minds.