Software Projects

Installing the Android SDK from the Command Line

Posted in Uncategorized by rmt on July 24, 2012

(Ubuntu 12.04)

The following are instructions for setting up the Android SDK from the command line.

Install Eclipse:

sudo apt-get install eclipse

Install Android SDK:

sudo apt-get install ia32-libs
wget http://dl.google.com/android/android-sdk_r20-linux.tgz
tar xzvf android-sdk_*
echo ‘export ANDROID_HOME=/home/$USER/android-sdk-linux’ >> /home/$USER/.bashrc
echo ‘PATH=$PATH:$ANDROID_HOME/tools’ >> /home/$USER/.bashrc
echo ‘export PATH=$PATH:$ANDROID_HOME/platform-tools’ >> /home/$USER/.bashrc
source ~/.bashrc
android update sdk –no-ui –force

Install Android NDK:

wget http://dl.google.com/android/ndk/android-ndk-r8-linux-x86.tar.bz2
bunzip2 android-ndk-
tar xvf android-ndk-

echo ‘export ANDROID_NDK_HOME=/home/$USER/android-ndk-r8’ >> /home/$USER/.bashrc
echo ‘export PATH=$PATH:$ANDROID_NDK_HOME’ >> /home/$USER/.bashrc
source ~/.bashrc

Install Android ADT Plugin:

eclipse

Help->Install New Software->Add https://dl-ssl.google.com/android/eclipse/->Developer Tools

Preferences->SDK Location->(Set the SDK Location)

Help->Check for Updates

Create an AVD:

android create avd -n 4.0.3 -t 27 –abi armeabi-v7a

Maven Installation

Install Maven 3:

wget http://www.globalish.com/am/maven/binaries/apache-maven-3.0.4-bin.tar.gz
tar xzvf apache-maven-3.0.4-bin.tar.gz
echo ‘export M3_HOME=/home/$USER/apache-maven-3.0.4’ >> /home/$USER/.bashrc
echo ‘export M3=$M3_HOME/bin’ >> /home/$USER/.bashrc
echo ‘export PATH=$PATH:$M3_HOME’ >> /home/$USER/.bashrc
source ~/.bashrc

Install android-maven-plugin:

sudo apt-get install git
git clone http://github.com/jayway/maven-android-plugin
cd maven-android-plugin
mvn clean install

Install maven-android-sdk-deployer:

git clone https://github.com/mosabua/maven-android-sdk-deployer
cd maven-android-sdk-deployer
mvn install

Install maven-android-plugin-samples:

git clone https://github.com/jayway/maven-android-plugin-samples
cd maven-android-plugin-samples
mvn clean install

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s