Created
April 15, 2021 16:15
-
-
Save danielkv/0a1df623f494cdd28f207ad3a665a0d2 to your computer and use it in GitHub Desktop.
Setup Android SDK in WSL 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~ | |
sudo apt-get update | |
sudo apt-get install unzip zip | |
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip | |
unzip sdk-tools-linux-4333796.zip -d Android | |
rm sdk-tools-linux-4333796.zip | |
sudo apt-get install -y lib32z1 openjdk-8-jdk | |
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 | |
export PATH=$PATH:$JAVA_HOME/bin | |
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.zshrc | |
cd Android/tools/bin | |
./sdkmanager --install "platform-tools" "platforms;android-26" "build-tools;26.0.3" | |
export ANDROID_HOME=~/Android | |
export PATH=$ANDROID_HOME/tools:$PATH | |
export PATH=$ANDROID_HOME/tools/bin:$PATH | |
export PATH=$ANDROID_HOME/platform-tools:$PATH | |
printf "\n\nexport ANDROID_HOME=~/Android\nexport PATH=\$PATH:\$ANDROID_HOME/tools\nexport PATH=\$PATH:\$ANDROID_HOME/platform-tools" >> ~/.zshrc | |
sdkmanager --update | |
curl -s "https://get.sdkman.io" | bash | |
source "$HOME/.sdkman/bin/sdkman-init.sh" | |
sdk install gradle 5.5.1 | |
gradle -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment