Eclipse Android SDK on Linux

This is quite a long list of instructions so if anyone has a better solution, please provide me with the tutorial and I will replace this on.  Credit for this install content goes to Platz on the debian.net forums.

Set up Java sources on Debian Linux 7 (Squeeze)

  1. su -
  2. echo “deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main” | tee -a /etc/apt/sources.list
  3. echo “deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main” | tee -a /etc/apt/sources.list
  4. apt-key adv –keyserver keyserver.ubuntu.com –recv-keys EEA14886

Install JDK7 on Debian Linux 7 (Squeeze)

  1. apt-get update
  2. apt-get install oracle-java7-installer
  3. exit
  4. When prompted whether to continue, enter “Y”. Don’t worry by the “Abort” message. Continue with step below.
  5. apt-get install oracle-java7-set-default
  6. Agree to licenses and download and installation

 

After install you have to enable the jdk.

  1. update-alternatives –display java (note there are two – dashes before display, formatting turned them into one).

You should see the link points to java7 directories n will begin.

 

Check if Java JDK7 is used

  1. Java –version

You should see something like:

Java version “1.7.x_xx” where the x’s are the latest revision

Java SE runtime …..

Java HotSpot Server ….

Javac –version

You should see something like:

Javac 1.7.x_xx

 

Remove OpenJDK on Debian Linux 7 (Squeeze)

  1. Open Synaptic Application Manager
  2. Search for “Open”.
  3. Select the Open JDK and Mark for Complete Removal including any dependencies.
  4. Apply.

 

Install Eclipse on Debian Linux 7 (Squeeze)

  1. Open Synaptic Application Manager
  2. Search for Eclipse.
  3. Mark for installation and “Apply” including any dependancies.
  4. Open Eclipse and update to use installed JRE:
  5. Window -> Preferences -> Java -> Installed JREs -> Add -> Standard VM -> Next -> Navigate to: /usr/lib/jvm/java-7-oracle/jre directory -> OK -> Enable by selecting the check box (depressed is enabled)
  6. Update Compiler compliance level to 1.7 or whatever version installed / latest.

 

Install Android SDK on Debian Linux 7 (Squeeze)

  1. Open terminal.
  2. Download Android SDK using the following command (note version at this time is 22.0.1):
  3. @ https://developer.android.com/sdk/index … xistingIDE

 

  1. Navigate to downloaded directory, extract there.
  2. In Terminal, change to extracted directory:
  3. cd Downloads
  4. Move Android SDK into this directory:
  5. mv android-sdk-linux /usr/lib/
  6. Change to the Tools directory:
  7. cd /usr/lib/android-sdk-linux-/tools
  8. Install:
  9. ./android
  10. Android SDK Manager will open for updates, select Android version you intend to develop with (USB Driver is handled manually as instructed by Android Developer site).
  11. Add Android SDK to your path environment:
  12. mousepad ~/.bashrc (opens mousepad text editor)
  13. Add and save to the very top of the file, the following:
  14. export PATH=${PATH}:~/android-sdk-linux/tools
  15. export PATH=${PATH}:~/android-sdk-linux/platform-tools

 

Install ADT Plugin on Debian Linux 7 (Squeeze)

  1. Run Eclipse.
  2. Under Help -> Install new software.
  3. Enter https://dl-ssl.google.com/android/eclipse/
  4. Add name as “ADT Plugin”.
  5. Check mark Developer Tools.
  6. Select Next, Next, Agree to start download. OK to any “Unsigned …”.
  7. Setup location of Android SDK within Eclipse. Open Preferences. Point to /usr/lib
  8. /android-sdk-linux directory or where ever you placed Android SDK.
  9. Open Eclipse -> Window -> Customize Perspective -> Command Groups Availability tab -> Under Available command groups:….enable “Android SDK and AVD manager” -> OK.
Android SDK manager

Next Android Game Programming Lesson – Day 1.2 >>