I am using VS Code. After some experiments with building flutter for web it's began to build every project for web be default. I need to get it back by default Android version.
PS D:\code\2019\dart_app1\app1> flutter devices
2 connected devices:
Windows • Windows • windows-x64 • Microsoft Windows [Version 10.0.17134.984]
Chrome • chrome • web-javascript • Google Chrome 76.0.3809.132
>PS D:\code\2019\dart_app1\app1> flutter emulators
3 available emulators:
Nexus_5X_API_29 • Nexus 5X API 29 • Google • android
Nexus_9_API_28 • Nexus 9 API 28 • Google • android
flutter_emulator • flutter emulator • Google • android
To run an emulator, run 'flutter emulators --launch <emulator id>'.
To create a new emulator, run 'flutter emulators --create [--name xyz]'.
You can find more information on managing emulators at the links below:
https://developer.android.com/studio/run/managing-avds
https://developer.android.com/studio/command-line/avdmanager
launch.json:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Flutter",
"request": "launch",
"type": "dart"
}
]
}
Flutter is an ideal choice for businesses looking to develop an app for the web and mobile at the same time. With Flutter, a single codebase can be used to develop apps for different platforms.
Specify your device in launch.json
file with args
parameter:
{
"version": "0.2.0",
"configurations": [
{
"name": "Flutter",
"request": "launch",
"type": "dart",
"args": ["-d", "<device name from adb devices output>"]
}
]
}
Or select from vscode
bottom panel at right side. By default launcher select first available device, and chrome device
probably always that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With