A new Flutter project.
- adb (if using Wireless debugging or Android emulator)
- Add
adbexecutable to your PATH variable
- Add
- Open folder in VSCode
- Click
Reopen in containerfrom bottom right prompt
- In a terminal inside the container, run the following command at the root of the repository
flutter-web
The application should be accessible at http://localhost:8090
Ensure developer mode is turned on and USB Debugging (Wireless Debugging for MacOS/Windows) is enabled on the mobile device.
-
Connect your android device
-
Set the connection mode to
PTPorFile transfer / Android Autoinside the mobile device.
- Uncomment the portions of .devcontainer/devcontainer.json related to
Linux OS HostandUSB Debugging Support - Open command pallete in VS Code and select
Remote-Containers: Rebuild Container - Run the following command at the root of the repository
flutter run
Your android device and computer will need to be on the same network. Since USB passthrough cannot be accomplished on Mac and Windows, we will configure debugging over the network.
In a terminal the host machine:
- Run the following command to see the list of connected devices
adb devices
- Run the following commands to connect to the device wirelessly
adb tcpip 555 adb connect <phone ip address> adb devices
- Disconnect your android device and re-run
adb devicesto verify that the device is still connected wirelessly
Inside dev container
- Open folder in VSCode
- Click
Reopen in containerfrom bottom right prompt - Run the following command to see the list of connected devices
adb devices
- Run the following commands to connect to the device wirelessly
adb connect <phone ip address>:5555 adb devices
- If you get
device unauthorized, run the following commands:adb kill-server adb connect <phone ip address>:5555 adb devices
- If you get
- Run the following command at the root of the repository
flutter run
- Uncomment the portions of .devcontainer/devcontainer.json related to
Linux OS HostandAndroid Emulator Support - Connect your android device
- Open command pallete in VS Code and select
Remote-Containers: Rebuild Container - In a terminal inside the container, run the following command at the root of the repository
flutter emulators --launch flutter_emulator
- In a new terminal inside the container, run the following command at the root of the repository
flutter run
- Start your local android emulator and run the following command on the host to make the emulator accessible via the network
adb tcpip 5555
- In a terminal inside the docker container, run the following command to connect to the emulator
adb connect host.docker.internal:555
- In a terminal inside the container, run the following command at the root of the repository
flutter run
