Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save trickpattyFH20/1afb3f1f9c3b00c0968ecdb3f9422565 to your computer and use it in GitHub Desktop.

Select an option

Save trickpattyFH20/1afb3f1f9c3b00c0968ecdb3f9422565 to your computer and use it in GitHub Desktop.
Ionic Android Development on WSL2 (Windows Subsystem for Linux)

Install Instructions

This is not a bash file! Just a lot command you need to run!

cd ~
sudo apt update
sudo apt upgrade

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm i -g ionic cordova @nestjs/cli @angular/cli

sudo apt install git
git config --global user.email "you@yourmail.com"
git config --global user.name "Your Name"
git config --global core.autocrlf input

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt install oracle-java8-set-default

# You can get an updated link from https://developer.android.com/studio/#downloads
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip
mv tools android-sdk-tools

Adding Android SDK to Path

Add the following to your .profile:

# Add Android SDK Manager to the PATH
PATH="/home/raimaj/android-sdk-tools:/home/raimaj/android-sdk-tools/bin:$PATH"

# Add Android SKD to PATH
export ANDROID_HOME=/usr/lib/android-sdk
PATH="$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment