Set up Android   On Linux  By Asanka Nissanka
Installing JDKDownload JDK from Oracle site    http://www.oracle.com/technetwork/java/javase/downloadsThe installation fil...
Update Java alternative list. You want to set a higher priority for the new JDK.(If you have alreadyinstalled open-jdk)   ...
Installing eclipse1. Download Eclipse Indigo from homepage (eclipse-jee-indigo-SR1-linux-gtk.tar.gz for 32 bit OS)2. Extra...
OPTIONAL STEP TO CREATE A LAUNCHER ON DESKTOP   Creating an eclipse executable in path       sudo touch /usr/bin/eclipse  ...
Prepare Android SDK1. Download the file “android-sdk-linux.tar.gz” from the babbage2. Extract it to /opt directory     cd ...
Finally goto Windows -> Preferences & there you will see a selection “Android”. Select it and set the SDK location
Lets START developing....
Thank youasankanissanka@gmail.com
Getting start android
Getting start android
Upcoming SlideShare
Loading in …5
×

Getting start android

1,091 views

Published on

Set up android development environment on linux

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,091
On SlideShare
0
From Embeds
0
Number of Embeds
361
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Getting start android

  1. 1. Set up Android On Linux By Asanka Nissanka
  2. 2. Installing JDKDownload JDK from Oracle site http://www.oracle.com/technetwork/java/javase/downloadsThe installation file I use is jdk-7u2-linux-i586.tar.gz.Change directory to install the JDK code in /opt cd /optextract the JDK files sudo tar -xvzf <location of downloaded JDK>/jdk-7u2-linux-i586.tar.gz This will put the JDK into the newly created directory named jdk1.7.0_02Update environment variables to point to the newly installed JDK by editing the /etc/environment file. sudo nano /etc/environment Add the JAVA_HOME variable, and add JDK bin to the PATH variable. JAVA_HOME="/opt/jdk1.7.0_01" PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/jdk1.7.0_01/bin"Refresh the environment variable. source /etc/environmentVerify that the updated environment variables are in place and the path to the JDK is valid $ echo $JAVA_HOME /opt/jdk1.7.0_01 $ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/jdk1.7.0_01/bin $ javac -version javac 1.7.0_01
  3. 3. Update Java alternative list. You want to set a higher priority for the new JDK.(If you have alreadyinstalled open-jdk) $ update-alternatives --verbose --query java Link: java Status: auto Best: /usr/lib/jvm/java-6-openjdk/jre/bin/java Value: /usr/lib/jvm/java-6-openjdk/jre/bin/java Alternative: /usr/lib/jvm/java-6-openjdk/jre/bin/java Priority: 1061 Slaves: java.1.gz /usr/lib/jvm/java-6-openjdk/jre/man/man1/java.1.gzSo, let’s make the new JDK our default… sudo update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_02/bin/java update-alternatives: using /opt/jdk1.7.0_01/bin/java to provide /usr/bin/java (java) in auto mode.Now type java -version java version "1.7.0_02" Java(TM) SE Runtime Environment (build 1.7.0_01-b08) Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode)
  4. 4. Installing eclipse1. Download Eclipse Indigo from homepage (eclipse-jee-indigo-SR1-linux-gtk.tar.gz for 32 bit OS)2. Extract to a folder (can use Archive Manager or tar command) cd /opt sudo tar -xvzf <eclipse tar ball directory>/eclipse-jee-indigo-SR1-linux-gtk.tar.gz sudo chown -R root:root eclipse sudo chmod -R +r eclipse3. Run Eclipse from command line: cd <eclipse foler>./eclipse4. If we get the warning about the GTK same as below: Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap", just install the missing module using below command: sudo apt-get install gtk2-engines-pixbuf
  5. 5. OPTIONAL STEP TO CREATE A LAUNCHER ON DESKTOP Creating an eclipse executable in path sudo touch /usr/bin/eclipse sudo chmod 755 /usr/bin/eclipse sudo nano /usr/bin/eclipse Copy this to nano, then save & exit #!/bin/sh #export MOZILLA_FIVE_HOME="/usr/lib/mozilla/" export ECLIPSE_HOME="/opt/eclipse" $ECLIPSE_HOME/eclipse $* Create a gnome menu item sudo nano /usr/share/applications/eclipse.desktop Copy this to nano, then save and exit [Desktop Entry] Encoding=UTF-8 Name=Eclipse Comment=Eclipse IDE Exec=eclipse Icon=/opt/eclipse/icon.xpm Terminal=false Type=Application Categories=GNOME;Application;Development; StartupNotify=true Launch eclipse for the first time /opt/eclipse/eclipse -clean &
  6. 6. Prepare Android SDK1. Download the file “android-sdk-linux.tar.gz” from the babbage2. Extract it to /opt directory cd /opt sudo tar -xvzf <path to the sdk file>/android-sdk-linux.tar.gzAdd ADT plugin to eclipse Help → Install New Software → Add
  7. 7. Finally goto Windows -> Preferences & there you will see a selection “Android”. Select it and set the SDK location
  8. 8. Lets START developing....
  9. 9. Thank youasankanissanka@gmail.com

×