X-Git-Url: https://git.ao2.it/android/android-app-development-getting-started.git/blobdiff_plain/b1642210516b6aeb2762d6811506f4fb6d66c24c..0f30c7c101e4df20f31888c5466a64b6fc8f34b4:/android-app-development-getting-started.sh diff --git a/android-app-development-getting-started.sh b/android-app-development-getting-started.sh index 971aa72..faee212 100755 --- a/android-app-development-getting-started.sh +++ b/android-app-development-getting-started.sh @@ -5,11 +5,11 @@ # # Similar to # http://vishalraj.in/blogs/hello-world-writing-my-first-android-app-on-linux -# -# The base working dir is assumed to be $HOME/Android -mkdir $HOME/Android -cd $HOME/Android +ANDROID_BASE_DIR=$HOME/Android + +mkdir $ANDROID_BASE_DIR +cd $ANDROID_BASE_DIR # Download and unpack the SDK from # http://developer.android.com/sdk/index.html @@ -17,7 +17,7 @@ wget http://dl.google.com/android/android-sdk_r21.1-linux.tgz tar xzvf android-sdk_r21.1-linux.tgz # Add "platform-tools" and "tools" to the PATH -export ANDROID_HOME=$HOME/Android/android-sdk-linux +export ANDROID_HOME=$ANDROID_BASE_DIR/android-sdk-linux export PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools # List packages @@ -37,16 +37,16 @@ sudo aptitude install ant # Create a Hello World application # http://developer.android.com/tools/projects/projects-cmdline.html -mkdir $HOME/Android/Apps +mkdir $ANDROID_BASE_DIR/Apps android create project \ --target android-17 \ --name MyFirstApp \ - --path $HOME/Android/Apps/MyFirstApp \ + --path $ANDROID_BASE_DIR/Apps/MyFirstApp \ --activity MainActivity \ --package com.example.myfirstapp # And maybe you want to use git for your App? -cd $HOME/Android/Apps/MyFirstApp +cd $ANDROID_BASE_DIR/Apps/MyFirstApp ant clean git init git add . @@ -63,7 +63,7 @@ http://developer.android.com/training/basics/firstapp/building-ui.html # Build the App # http://developer.android.com/tools/building/building-cmdline.html -cd $HOME/Android/Apps/MyFirstApp +cd $ANDROID_BASE_DIR/Apps/MyFirstApp ant debug # Start the emulator, hardware accelerated: