-
Notifications
You must be signed in to change notification settings - Fork 340
Closed
Labels
Milestone
Description
flutter config --no-enable-android- Open a Flutter project without an
androidfolder - Click the Device Selector and select "Enable Android for this Project"
This runs flutter create --platforms android . in the background, which completes without error but does not create the android folder and therefore appears to do nothing. Even if you switch to the Output pane to see the output, it's not clear anything went wrong:
[flutter_application_1] flutter create --platforms android --org com.dantup .
Recreating project ....
analysis_options.yaml (created)
Running "flutter pub get" in flutter_application_1... 914ms
Wrote 1 files.
All done!
In order to run your application, type:
$ cd .
$ flutter run
Your application code is in ./lib/main.dart.
exit code 0
Some possible options:
- We run
flutter config --machineand notice that Android is disabled globally and either
a. Hide the option to enable Android
b. Ask the user if we should enable it globally (by runningflutter config --enable-android)
c. Change "Enable Android for this project" to something more specific ("Enable Android globally and configure for this project") and automatically do (b) to enable it - Change Flutter to emit an error when
--platformsdoesn't match any platforms when filtering out what's disabled (this would result in the error being visible to the user when they run "Enable Android for this project" because it would return an error code)
Note: We need to restart the Daemon after flutter config --enable-android is run. When the user runs it, they are shown "You may need to restart any open editors for them to read new settings" but if we're running it automatically they won't see it.
@csells any opinions on which of these you think would work best?
R-3MY