Go Back   Android Forums > Android Development > Application Development
Application Development Dev Lounge for the Coder Folks
Gamers - Check out our new sister sites!
Nintendo Wii U!    |    OUYA - $99 Android System!

test: Reply
 
LinkBack Thread Tools
Old December 2nd, 2008, 02:57 PM   #1 (permalink)
Member
Thread Author (OP)
 
devolio's Avatar
 
Join Date: Oct 2008
Location: Michigan
Posts: 339
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 37 Times in 11 Posts
Send a message via AIM to devolio
Default Installing Eclipse and the Android SDK (Ubuntu 8.04/8.10)

Note: In this tutorial, I'm using Xubuntu 8.04. These steps are the same for Ubuntu and Kubuntu as well. They're also the exact same for [Xu|Ku|U]buntu 8.10.

The first thing we need to do is download all of the needed files. First up, the Android SDK. You can download it from http://code.google.com/android/download.html

We're also going to need Eclipse. Head over to http://www.eclipse.org/downloads/. The version we want is Eclipse IDE for Java Developers. The JEE version will work as well.



Next, we're going to need Java. Bring up a terminal window (Applications -> Accessories -> Terminal). We can install it using apt, by running...

sudo apt-get install sun-java6-bin



(If you're using a 64 bit distribution, you'll also need to install the ia32-libs as well)

Once it's done downloading the files, it will prompt you about the license.



Press tab, and then enter. It will tell you that you have to accept the license to continue, and then prompt you again. Select yes, and press enter to continue.



Now that Java is installed, we can get started on Eclipse. First, let's untar/gzip Eclipse. In our terminal window...

cd ~/Desktop

And then untar/gzip the file.

tar xvfz eclipse-jee-ganymede-SR1-linux-gtk.tar.gz



Finally, move it into your home folder.

mv eclipse ~



Now, if you want to add eclipse to your menu, right click on Applications and Edit Menu. Click on Programming, and then click New Item. Type in the name, and the full location to Eclipse (/home/yourusername/eclipse/eclipse), and finally, click OK.

Personally, I just made a launcher for it on my Desktop.



Now, let's extract the Android SDK. Back in the terminal again...

unzip android-sdk-linux_x86-1.0_r1.zip



Let's move the resulting folder into our home folder.

mv android-sdk-linux_x86-1.0_r1/ ~



Now, this is the single most important step. Without this, we'll encounter all sorts of odd problems later. Open up your ~/.bashrc in your favorite editor (because I'm doing this in Xubuntu, I'm using mousepad. You can use whatever you'd like.)

sudo mousepad ~/.bashrc

And we're going to add the following at the bottom of the file (making sure you replace yourusername with your actual username.)

export PATH=${PATH}:/home/yourusername/android-sdk-linux_x86-1.0_r1/tools



Save the changes, and exit your editor. Now, we can start up Eclipse.

Eclipse will prompt you to choose a workspace location.



This is where all of your project files will be stored. Set it where you want, and click OK.

Once Eclipse is started up, we can add the ADT plugin. In the menu, Help -> Software Updates.



Click on the Available Software tab, and then Add Site. For the location, we're going to enter http://dl-ssl.google.com/android/eclipse/



And click OK. Eclipse will go find the list of available software, and update your list.



Click the checkbox next to the Location we just added to select all of the software, and click Install.



Eclipse will calculate all of the requirements and download the needed files. Then you'll be greeted by the Install window.



Click Next to install the selected tools. You'll be asked to agree to the license.



Accept the license agreement, and then click Finish. Eclipse will install everything...



...And then will prompt you to restart, click Yes. Eclipse will restart.

The last thing we need to do is point the ADT plugin to our Android SDK folder. In the top menu, go to Window -> Preferences, and then click on the Android tab.



Click Browse, choose the Android SDK folder, and then click OK. Now click Apply and let Eclipse crunch on it for a second or two.



And click OK. You're finished!

To run a quick test and make sure everything is working properly, go to File -> New -> Project. Expand Android, click on Android Project, and click Next.



Now we'll have to fill in our project information. Because this is a test run, we'll call the project testrun. For the package name, we'll use com.android.test. And last but not least, the activity name will be test.



Click Finish.

Eclipse will crunch on that for a second, and open the project in the left pane. Expand the main tree to see the file structure of a default new project. The last thing we need to do before we run our test application is set up a run configuration. In the menu, go to Run -> Run Configurations...

Double click on Android Application and it will create a new configuration. Give the configuration a name, and click browse for the project.



Choose your project, click OK. Now click Apply, then Run.

You'll notice the bottom pane switches over to Console. This will let you know what's going on with the emulator. After a few seconds, the emulator will start up.



Note that the first run will take *much* longer than usual to start up, as it's setting up the Android OS while it starts up for the first time. Depending on the specs of your computer, it can take anywhere from a few minutes to over half an hour.

After awhile, you'll arrive at the starting screen. Usually, you'll get a few errors as things start up and can't be started.



I usually just click wait. In the console, you'll see it install, and then start up your application.





And with that, it's time for you to dive into the code and start making your application.

__________________
Guides
FAQ | Rooting | Installing SDK/Eclipse

My Stuff
Twitter | Apper | Yz | Yz Donation
devolio is offline  
Reply With Quote
The Following User Says Thank You to devolio For This Useful Post:
globus25 (June 28th, 2011)
Sponsors
Old May 31st, 2009, 03:50 AM   #2 (permalink)
Senior Member
 
KlaymenDK's Avatar
 
Join Date: May 2009
Location: Denmark
Posts: 1,220
 
Device(s): HTC Desire Z (rooted, CyanogenMod v7.1; Revoked ClockworkMod) HTC Desire (rooted, Oxygen rom; Revoke
Carrier: Not Provided

Thanks: 31
Thanked 131 Times in 100 Posts
Thumbs up PCLinuxOS, too

Hi,
just wanted to say that the plain "Linux" instructions listed at the Android and Eclipse sites work 100% for PCLinuxOS as well.
KlaymenDK is offline  
Reply With Quote
Old June 29th, 2009, 01:13 PM   #3 (permalink)
New Member
 
Join Date: Jun 2009
Posts: 1
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

In Fedora and Debian, Android SDK work perfectly .
HKVN is offline  
Reply With Quote
Old July 4th, 2009, 07:26 AM   #4 (permalink)
New Member
 
Join Date: Jun 2009
Posts: 11
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 1 Time in 1 Post
Default

Stupid thing in ubuntu 9.04 is that they don't have eclipse 3.3+ in repos which is required for android

So you must download/install it manually
confiq is offline  
Reply With Quote
Old December 13th, 2009, 02:21 PM   #5 (permalink)
Member
 
MountainX's Avatar
 
Join Date: Nov 2009
Posts: 140
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 3 Times in 2 Posts
Default

Quote:
Originally Posted by confiq View Post
Stupid thing in ubuntu 9.04 is that they don't have eclipse 3.3+ in repos which is required for android

So you must download/install it manually
I'm still on 9.04. I am going to use a "mixed" system and install Eclipse from Karmic on Jaunty based on advice from the Ubuntu forums.

I found a great blog about how to do it: http://blog.opperschaap.net/2009/12/...distributions/

"You could use that to receive updates for Eclipse on Karmic, and keep your own system on Jaunty. And when you feel ready to move on, you can remove the preferences file or change it to upgrade."

However, manual downloading and installing is pretty easy...
MountainX is offline  
Last edited by MountainX; December 13th, 2009 at 04:59 PM.
Reply With Quote
Old December 13th, 2009, 04:58 PM   #6 (permalink)
Member
 
MountainX's Avatar
 
Join Date: Nov 2009
Posts: 140
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 3 Times in 2 Posts
Default

On 64-bit Ubuntu, here is the command I used for installing java:

Code:
sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jkd sun-java6-plugin sun-java6-fonts ia32-libs
The JDK should be optional, but for some unknown reason, my java only worked after I installed the JDK. The plugin and fonts should be optional too.

Here's a helpful link:
Ubuntu Linux Install Sun Java Development Kit ( JDK ) and Java Runtime Environment ( JRE )
MountainX is offline  
Last edited by MountainX; December 17th, 2009 at 07:39 AM.
Reply With Quote
Old December 17th, 2009, 02:57 AM   #7 (permalink)
New Member
 
Join Date: Dec 2009
Location: Florida
Posts: 2
 
Device(s): HTC Droid Eris
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've done everything here I actually found it in another tutorial I've copy and pasted the hello world in, but mine is a bit different everywhere. Here is a picture of my laptop while waiting for the emulator to crash again.

It says android in that font for quite awhile after it says android in a bland font, like this posts font for example.

I've also noticed things are a bit different on my screen then on the tutorials.
I'm also doing all this from a very slow laptop with SSH and X forwarding to a faster desktop, incase that matters. The Desktop has all development files.

Thanks for any and all information If this should have been its own post I'm sorry,
Simy is offline  
Reply With Quote
Old December 17th, 2009, 07:19 AM   #8 (permalink)
Member
 
MountainX's Avatar
 
Join Date: Nov 2009
Posts: 140
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 3 Times in 2 Posts
Default

Quote:
Originally Posted by Simy View Post
I've done everything here I actually found it in another tutorial I've copy and pasted the hello world in, but mine is a bit different everywhere. Here is a picture of my laptop while waiting for the emulator to crash ...
Yes, I too noticed in the newest software versions that everything is a lot different from this tutorial. We need an updated tutorial.

The first time I ran my test project it took about 5 minutes (I think) for the emulator to go thru all its startup steps -- on a fairly fast desktop computer.

Also, I had to dismiss about 3-5 crash messages. I didn't even count them. I just dismissed them one after the other. From the tutorial, it sounded like this is expected.

I have no idea how the X forwarding will affect the emulator startup. Just give it plenty of time. All I can say is just wait and watch the messages in the console window and see what happens...
MountainX is offline  
Last edited by MountainX; December 17th, 2009 at 07:22 AM.
Reply With Quote
Old December 18th, 2009, 04:27 PM   #9 (permalink)
New Member
 
Join Date: Dec 2009
Location: Florida
Posts: 2
 
Device(s): HTC Droid Eris
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

When I have a chance ill try again. But work is getting in the way as usual.....

Next time ill give it an entire day on the desktop. See whay happens
Simy is offline  
Reply With Quote
Old February 7th, 2010, 11:24 AM   #10 (permalink)
Junior Member
 
Join Date: Feb 2010
Location: /home/ohio
Posts: 21
 
Device(s): Moto Droid/HTC Eris/G1
Carrier: Not Provided

Thanks: 1
Thanked 1 Time in 1 Post
Send a message via MSN to montyboy
Default Mac OS X

Mind if I use a large percentage of this (giving credit of course) and create a Mac OS X installation sticky?
montyboy is offline  
Reply With Quote
Sponsors
Old August 1st, 2010, 02:33 PM   #11 (permalink)
New Member
 
Join Date: Aug 2010
Posts: 1
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default Ubuntu 10.04 - Eclipse Problems

I just got done installing the Java SDK and Eclipse on Ubuntu 10.04. The problem i had was that Eclipse Helios (3.6) didn't work. I had to use Eclipse Galileo (3.5) in order for Android to show up as an option in the Projects list.
dataphile is offline  
Reply With Quote
Old June 26th, 2011, 02:07 PM   #12 (permalink)
New Member
 
Join Date: Jun 2011
Posts: 3
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to mdl4
Default

I wrote a similar tutorial on installing the r11 Android SDK and Eclipse Indigo on Ubuntu Natty (11.04). The process is very similar, but someone might find it helpful.

How to Install the Android SDK and Eclipse Indigo on Ubuntu
mdl4 is offline  
Reply With Quote
Old December 3rd, 2011, 11:06 PM   #13 (permalink)
New Member
 
Join Date: Aug 2011
Location: Land of Awesomeness (and occasionally earth)
Posts: 8
 
Device(s): NONE YET! Considering Arhos 43 Moto Droid NExus one Archos 101 Viewsonic G Tablet
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Devolio, thanks SOOOO much this was best guide I ever saw and went to a lot of sites. Thanks so much.
johntkucz is offline  
Reply With Quote
Old December 3rd, 2011, 11:09 PM   #14 (permalink)
New Member
 
Join Date: Aug 2011
Location: Land of Awesomeness (and occasionally earth)
Posts: 8
 
Device(s): NONE YET! Considering Arhos 43 Moto Droid NExus one Archos 101 Viewsonic G Tablet
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by johntkucz View Post
Devolio, thanks SOOOO much this was best guide I ever saw and went to a lot of sites. Thanks so much.

That said....do you have (have you made) or can you rec any more guides? Thanks!

(I have skimmed a few guides and books on android dev but, well, this guide of yours worked!)
johntkucz is offline  
Reply With Quote
Old February 10th, 2012, 10:05 AM   #15 (permalink)
Junior Member
 
loveubuntu's Avatar
 
Join Date: Nov 2011
Posts: 17
 
Device(s):
Carrier: Not Provided

Thanks: 4
Thanked 2 Times in 2 Posts
Default

I wrote in this thread on XDA to set sdk, adb, and java in Ubuntu 11.10


the original thread was for Ubuntu 10.04, 10.10 and, and 11.04
loveubuntu is offline  
Reply With Quote
Old March 28th, 2012, 04:33 PM   #16 (permalink)
New Member
 
Join Date: Mar 2012
Posts: 12
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the tutorial
droidbot45 is offline  
Reply With Quote
Old July 31st, 2012, 11:18 AM   #17 (permalink)
New Member
 
Join Date: Jun 2011
Posts: 3
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to mdl4
Default

I wrote an illustrated installation/getting started guide for installing Eclipse Indigo and the Android SDK on Ubuntu 11.10/12.04.

Last night I had to upgrade to Juno so I wrote up an abbreviated quickstart guide for Eclipse Juno and the Android SDK on [X]ubuntu 12.04.

The process has changed quite a bit since 2008. Hope it helps.
mdl4 is offline  
Reply With Quote
Old October 2nd, 2012, 10:31 PM   #18 (permalink)
New Member
 
Join Date: Mar 2011
Posts: 4
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you're on Windows, or mac this Android Getting Started Tutorial should help out. It's from mybringback and they have a bunch of android tutorials for beginners. Hope that helps
chilin221 is offline  
Reply With Quote
Reply
Tags
eclipse, eclipse install, ubuntu, ubuntu install


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 12:29 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.