You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
flutter precache: explain what are "currently enabled plaforms" #144656
$ flutter precache --help
Populate the Flutter tool's cache of binary artifacts.
If no explicit platform flags are provided, this command will download the artifacts for all currently enabled platforms
...
What are currently enabled platforms? Let's say I don't have any Flutter project on my machine and I run flutter precache – how are enabled platforms inferred?
On Linux, I noticed that flutter precache is equivalent to flutter precache --android --web --linux.
On macOS I noticed that flutter precache is equivalent to flutter precache --android --web --macos --ios.
So I can see the pattern (currently enabled platforms are all platforms that can be built on the current OS), but I feel like it's not explained well enough.
I think the help message should answer these doubts.
currently enabled platforms are all platforms that can be built on the current OS
That's the default behavior, but "enabled" here is referring to the flutter config option of disabling and disabling platforms. If you can build a platform on your host OS, but you have disabled that platform via flutter config, then it's not an enabled platform.
Thank you for very quick response! This answers my original question, but I have one more now – I ran flutter config --list and it shows e.g. enable-ios: (Not set) and enable-android: (Not set), while I can build iOS and Android apps just fine. The artifacts are also there. Why is that?
I'll also say that I did not explicitly enable enable-linux-desktop nor enable-macos-desktop (or at least I don't recall doing so). Not sure if this is expected or maybe if something automatically enables it.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
stuartmorgan-g commentedon Mar 6, 2024
That's the default behavior, but "enabled" here is referring to the
flutter configoption of disabling and disabling platforms. If you can build a platform on your host OS, but you have disabled that platform viaflutter config, then it's not an enabled platform.bartekpacia commentedon Mar 6, 2024
Thank you for very quick response! This answers my original question, but I have one more now – I ran
flutter config --listand it shows e.g.enable-ios: (Not set)andenable-android: (Not set), while I can build iOS and Android apps just fine. The artifacts are also there. Why is that?I'm on macOS Sonoma, MacBook Air M1.
Flutter 3.20.0-13.0.pre.30 (master)
stuartmorgan-g commentedon Mar 6, 2024
"not set" doesn't mean "false", it means you haven't set an explicit value.
bartekpacia commentedon Mar 6, 2024
Alright, thanks. Makes sense.
I'll also say that I did not explicitly enable
enable-linux-desktopnorenable-macos-desktop(or at least I don't recall doing so). Not sure if this is expected or maybe if something automatically enables it.Clarify precache enabled platforms help (flutter#186878)
Clarify precache enabled platforms help (flutter#186878)
github-actions commentedon Jul 14, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.