Created
October 22, 2014 07:53
-
-
Save cybertk/28565ee95d74e65444e6 to your computer and use it in GitHub Desktop.
Android Development Environment Setup
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
MAC_SDK_DIR="/Applications/Android Studio.app/sdk" | |
LINUX_SDK_DIR="~/opt/android-sdk" | |
if [ -d "$MAC_SDK_DIR" ]; then | |
ANDROID_SDK=$MAC_SDK_DIR | |
fi | |
# Setup Android SDK Env | |
if [ -n "$ANDROID_SDK" ]; then | |
echo "Load Android SDK at $MAC_SDK_DIR" | |
# Path for SDK general tools | |
ANDROID_SDK_TOOL=$ANDROID_SDK/tools | |
# Path for SDK platform tools | |
ANDROID_SDK_PTOOL=$ANDROID_SDK/platform-tools | |
# Clear the path first | |
PATH=${PATH/$ANDROID_SDK_TOOL:/} | |
PATH=${PATH/$ANDROID_SDK_PTOOL:/} | |
# Setup path | |
export PATH=$ANDROID_SDK_TOOL:$PATH | |
export PATH=$ANDROID_SDK_PTOOL:$PATH | |
unset ANDROID_SDK_TOOL | |
unset ANDROID_SDK_PTOOL | |
unset ANDROID_SDK | |
fi | |
# Setup Android NDK path | |
if [ -n "$ANDROID_NDK" ]; then | |
# Clear the path first | |
PATH=${PATH/$ANDROID_NDK:/} | |
# Setup NDK Path. | |
export PATH=$ANDROID_NDK:$PATH | |
# Clear | |
unset ANDROID_NDK | |
fi | |
unset MAC_SDK_DIR | |
unset LINUX_SDK_DIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment