This repository is a template for mount a local environment for work with Flutter inside a container.
- You need installed Docker in your machine.
- Clone your flutter project into
/workspace
folder. - Open this project in vscode and after select open in container.
- Enjoi, happy coding!
In the NoEMEC channel we will have a video teaching how to use this repository.
- Connect your Android device via USB before to open the dev container.
- Connect your device via USB and make sure debugging is enabled, then run:
adb tcpip 5555
- Find the IP address of your device, go to Settings > Wi-Fi > Advanced > IP Address on your device or run
adb shell netcfg
. - Connect to device using the IP address with the following command:
adb connect xxx.xxx.x.x
- Disconnect your device from USB and proceed with wireless debugging.
Troubleshooting: You can try kill the adb daemon in your host machine using the command
abd kill-server
and then your container should have access to list the device.
In these two operating systems it is not possible to share your USB device with the container, that is why we must resort to an alternative way.
First you will have to have the platforms tools that contain ADB installed on your host machine and you can download them here
- Connect your device via USB and make sure debugging is enabled, then run in your host machine:
adb tcpip 5555
- Find the IP address of your device, go to Settings > Wi-Fi > Advanced > IP Address on your device or run
adb shell netcfg
. - Connect to device using the IP address with the following command:
adb connect xxx.xxx.x.x
- Disconnect USB and proceed to open the dev container in vscode.
- Now inside your container run the command from step 3 with the same IP address.
- Verify if the container can list now your device using
adb devices
.
- Android Sdk
- Flutter
- Git
- ADB
Contributions are always welcome!