2.8 KiB
2.8 KiB
Setup https://docs.flutter.dev/get-started/install/linux/desktop
- download the flutter sdk bundle https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.24.4-stable.tar.xz
- Create a folder
~/development/flutterand extract content of previously downloaded bundle heretar -xf ~/Downloads/flutter_linux_3.24.4-stable.tar.xz -C ~/development/ - in
.bashrcadd this to add in environment variable PATHecho 'export PATH="~/development/flutter/bin:$PATH"' >> ~/.bash_profile - to check if components of flutter development is installed use
flutter doctor - Create sample flutter app with
flutter create .at directory where project files will be created - run it with
flutter run. to run for specific device in case there r multiple device connected to adb or choose desktop one instead of mobiles thenflutter run -d <device_id>. to list devices useflutter devices
Android development tools setup
-
these must be installed
Android SDK Platform, API 35.0.1 Android SDK Command-line Tools Android SDK Build-Tools Android SDK Platform-Tools Android Emulator -
refer to for installation of android emulator android-sdk-installation.md or Android emulator on linux
-
enable usb debugging and connect it with usb to check and debug through mobile instead of using emulator
-
for wifi debugging do this https://stackoverflow.com/questions/4893953/run-install-debug-android-applications-over-wi-fi
- Connect the device to the same Wi-Fi as your computer
- Get your device IP address (in Settings → About phone → Status)
- Enable adb over TCP/IP on your device:
adb tcpip 5555 - Connect to your device:
adb connect DEVICE_IP:5555 (replace DEVICE_IP) - Unplug your device
- To switch the server back to the USB mode, run
adb usband back to wireless withadb tcpip 5555 - to disconnect use
adb disconnect: this will disconnect all adb devices for specific device useadb disconnect <device-ip>:<port>for android 11 or newer following can be used too
- Ensure both your computer and phone are connected to the same Wi-Fi network.
- On your Android device, go to Settings > System > Developer options and enable Wireless debugging.
- Select Pair device with pairing code to view your device's IP, port number, and a 6-digit code.On your computer, open your terminal and run
adb pair ip_address:port. (the port which it shows) - Enter the pairing code when prompted
- now connect too with
adb connect ip_address:port. this port can be different and will be mentioned there below wireless debugging toggle
ip_address:port examples
192.168.29.216:37111