Skip to content

Instantly share code, notes, and snippets.

@SyllaJay
Forked from johnjohndoe/android-sdk-setup.sh
Last active August 29, 2015 14:17
Show Gist options
  • Save SyllaJay/d6f16a3b7197b9204ddc to your computer and use it in GitHub Desktop.
Save SyllaJay/d6f16a3b7197b9204ddc to your computer and use it in GitHub Desktop.
#!/bin/bash
# Author: Tobias Preuss
# Version: 2015-01-19
echo "Creating symbolic links in Android SDK folder"
echo "============================================="
echo
if [ -z "$ANDROID_HOME" ] ; then
echo "Could not find Android SDK. Environment variable ANDROID_HOME is not defined."
exit 1
fi
if [ ! -d "$ANDROID_HOME/build-tools/21.1.1" ] ; then
echo "Could not find build-tools folder 21.1.1. Please download the latest version first."
exit 1
fi
echo "Found ANDROID_HOME set to $ANDROID_HOME"
echo
# For IntelliJ and Android-Studio
ln -s $ANDROID_HOME/platform-tools/adb $ANDROID_HOME/tools/adb
ln -s $ANDROID_HOME/build-tools/21.1.2/aapt $ANDROID_HOME/tools/aapt
ln -s $ANDROID_HOME/build-tools/21.1.2/dx $ANDROID_HOME/tools/dx
ln -s $ANDROID_HOME/build-tools/21.1.2/zipalign $ANDROID_HOME/tools/zipalign
ln -s $ANDROID_HOME/build-tools/21.1.2/lib/dx.jar $ANDROID_HOME/tools/dx.jar
# For Gradle
ln -s $ANDROID_HOME/build-tools/21.1.2/lib/dx.jar $ANDROID_HOME/build-tools/17.0.0/lib/dx.jar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment