Flutter Setup
Install flutter in WSL
https://docs.flutter.dev/get-started/install/linux
sudo snap install flutter --classic
flutter sdk-path
Check FLutter install status
flutter doctor
Install Android Studio in WSL
Install android studio linux tar gz file
Install using snap
install java if needed
sudo apt install openjdk-18-jdk
sudo snap install android-studio --classic
check android studio status
snap list android-studio
add andriod sdk path to flutter
flutter config --android-sdk ~/Android/Sdk/
Manually download and install
go into usr/local and unzip the tar gz file
cd /usr/local/
tar xf ~/Downloads/android-studio-version-number-linux.tar.gz
Restart the computer
Restart the computer
wsl --update
wsl --shutdown
Running Android Studio
android-studio
cd /usr/local/
android-studio/bin/studio.sh
Open Android Studio -> More Actions -> SDK manager -> SDK Tools -> Android SDK Command line
Configure Android
Start Android Studio.
The Welcome to Android Studio dialog displays.
Follow the Android Studio Setup Wizard.
Install the following components:
Android SDK Platform, API 33.0.0
Android SDK Command-line Tools
Android SDK Build-Tools
Android SDK Platform-Tools
Android Emulator
To fix android licencing
flutter doctor --android-licenses
Install Xming
Needed to render graphic applications
sudo apt update
sudo apt install x11-apps -y
xeyes
Install Chrome
sudo apt install -y chromium-browser
Connect Phone
Enable Developer options
Settings -> About phone -> Software Information -> Build Number
USB debugging
Settings -> Developer Options -> USB debugging && Wireless debugging
Connect Phone to Flutter in WSL
Install adb in windows
add path to windows environment path variable
C:\Users\bthek\OneDrive\Documents\platform-tools
Check for device connected
adb devices
Try restarting adb if device doesn’t show up
adb kill-server
adb start-server
Once your device is connected via USB, run the following command to map the desired port to adb.
adb tcpip 5555
Go to wsl and run
adb connnect <ip>:<port>
Example:
adb connect 192.168.1.4:5555