Thursday, December 15, 2011

Getting Eclipse and ADT working on Ubuntu 64

Getting Eclipse to run on Ubuntu 11.10 64bit with the Android Development Tools (32bit).


This is how I was able to get the Android Development Tools working on my Ubuntu 11.10 64bit machine. The problem is that when you install eclipse using apt-get, you'll get the 64bit version, however the android sdk needs a 32bit version of java. We can solve this issue by installing both the 64bit and 32bit versions of Java, this is how I did it.

#install the ia32-libs so you can run 32bit apps and shit
$ apt-get --reinstall install ia32-libs-multiarch ia32-libs

#install eclipse, this will install the 64bit version
$ apt-get install eclipse

#Get Oracles 32bit and 64 bit version of JDK
http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u2-download-1377129.html

#Decompress each tarball and rename the 64 bit folder and move both the /usr/lib/jvm
$ mv jdk1.7.0_02/ /usr/lib/jvm/ <---mv 32bit version to /usr/lib/jvm
$ mv jdk1.7.0_02/ jdk64_1.7.0_0 <---rename 64bit version
$ mv jdk64_1.7.0_0 /usr/lib/jvm <---mv 64 bit version

#Chown dem bitches
$ chown -R root:root /usr/lib/jvm/jdk1.7.0_02/
$ chown -R root:root /usr/lib/jvm/jdk64_1.7.0_02/

#Select the JDK using the following steps from http://www.webupd8.org/2011/09/how-to-install-oracle-java-7-jdk-in.html
$ add-apt-repository ppa:nilarimogard/webupd8
$ apt-get update
$ apt-get install update-java

#run update-java so Android SDK will us 32bit version
$ update-java (and select the 32 bit version (jdk1.7.0_02))

#update /etc/eclipse.ini to make eclipse run the 64 version of java
#nano /etc/eclipse.ini add the first two lines below
#-vm
#/usr/lib/jvm/jdk64_1.7.0_02/bin


$ cat /etc/eclipse.ini
-vm
/usr/lib/jvm/jdk64_1.7.0_02/bin
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.dist.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.dist
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Xms40m
-Xmx384m
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins

#Run eclipse and install ADT (Android Development Tools) http://developer.android.com/sdk/eclipse-adt.html


#If you get the following error after installing ADT Software being installed: Android Development Tools 11.0.0.v201105251008-128486 (com.android.ide.eclipse.adt.feature.group 11.0.0.v201105251008-128486) Missing requirement: Android Development Tools 11.0.0.v201105251008-128486 (com.android.ide.eclipse.adt.feature.group 11.0.0.v201105251008-128486) requires 'org.eclipse.wst.sse.core 0.0.0' but it could not be found
Here is the fix
http://stackoverflow.com/questions/6482268/eclipse-indigo-cannot-install-android-adt-plugin

#Next read http://developer.android.com/sdk/adding-components.html to get the SDK and other comopnents working

#b00m

No comments:

Post a Comment