How to set up Eclipse with Android SDK on Ubuntu linux 9.04/9.10 (updated)

來源:互聯網
上載者:User

In my first tutorial i will show you how to set up Eclipse 3.5 with Android Development Tools (ADT) on Ubuntu 9.04.

Before we can install the Android SDK, we must install Java. First we open a new terminal window (Applications > Accessories > Terminal).

To install Java, type:

sudo apt-get install sun-java6-bin 

If you are on a x86_64 system, you also must install ia32-libs:

sudo apt-get install ia32-libs

For Ubuntu 9.10 users:

Install eclipse from apt-sources, so open a terminal, then:

sudo apt-get install eclipse

Now open up Eclipse, and go to:
Help Menu -> Install New Software

* Add:
https://dl-ssl.google.com/android/eclipse/
http://download.eclipse.org/datatools/updates
http://download.eclipse.org/webtools/updates/
http://download.eclipse.org/modeling/emf/updates/releases/
http://download.eclipse.org/tools/gef/updates/releases/
http://dl.google.com/eclipse/plugin/3.5 (think this one's optional)

Install these packages, and then you can install adt plugin as well.

we must download Android SDK, located here: http://developer.android.com/sdk/index.html

Now open a terminal again and go to the directory where you've saved the Android SDK and uncompress it, then delete the archive file:

cd /home/joeygeek/Desktop tar xvfz android-sdk_r04-linux_86.tgz rm android-sdk_r04-linux_86.tgz

Move to your home directory:

mv android-sdk-linux_86 /home/joeygeek

Go to Window > Preferences. Select Android, and add the SDK Location: /home/joeygeek/android-sdk-linux_86
Click the Apply and then OK.

New step we update the Android API versions. Select Window > Android SDK and AVD Manager

* See the end of this tutorial...

Ubuntu 9.04 users:

Ubuntu 9.04 repositories only have a package for Eclipse 3.2 - therefore we must install Eclipse 3.5 manually, you can download it from http://www.eclipse.org/downloads/.

I've chosen the Eclipse Classic Developers for Linux 32bit (select Linux 64bit if you're on an x86_64 system).

Download the file and open a terminal again. Go to the directory, where you've downloaded the Eclipse file, e.g. your desktop (/home/joeygeek/Desktop), and uncompress it:

cd /home/joeygeek/Desktop tar xvfz eclipse-SDK-3.5.1-linux-gtk.tar.gz

Afterwards the eclipse directory located on your desktop, i move it to my home directory:

mv eclipse /home/joeygeek

Then you can delete the archive file (if you want):

rm eclipse-SDK-3.5.1-linux-gtk.tar.gz

Inside the eclipse directory, there is an executable file called eclipse, that's the file you must run to start eclipse.

cd /home/joeygeek/eclipse ./eclipse

 

Eclipse is asking for a workspace:

After that we must download Android SDK, located here:http://developer.android.com/sdk/index.html

Now open a terminal again and go to the directory where you've saved the Android SDK and uncompress it, then delete the archive file:

cd /home/joeygeek/Desktop tar xvfz android-sdk_r04-linux_86.tgz rm android-sdk_r04-linux_86.tgz

Move to your home directory:

mv android-sdk-linux_86 /home/joeygeek

Next, we must install Graphical Editing Framework (GEF) for Eclipse. You can download here:http://www.eclipse.org/gef/

You need GEF to install Android Eclipse plugin later.

Download, unzip then move in to your eclipse directory:

cd /home/joeygeek/Desktop unzip GEF-ALL-3.5.1.zip

Now we have a new eclipse directory on your desktop, move it to your "real" eclipse directory:

mv -f eclipse /home/joeygeek

Now start eclipse:

cd /home/joeygeek/eclipse ./eclipse

Next, we install the Android Eclipse plugin. In eclipse go to: Help > Install new Software
Click the Add.. button, and type  https://dl-ssl.google.com/android/eclipse/ to Location textbox. You can add a name your new site, e.g. call it "android"

Then click OK. The middle of the window, there is a checkbox, select Developer Tools (automatically check Android DDMS and Android developer tools)

Then click Finish. The plugins are now being installed. Eclipse must be restarted for the changes to take effect, so when you are asked if you want to restart Eclipse after the installation, you should select Yes. After Eclipse has started again, we must update our Eclipse preferences to point to the Android SDK directory. Go to Window > Preferences. Select Android, and add the SDK Location: /home/joeygeek/android-sdk-linux_86
Click the Apply and then OK.

New step we update the Android API versions. Select Window > Android SDK and AVD Manager

You should see that:

Sorry for windows window, but i did not want to delete my downloaded apis. :)))
Select all then click Install selected.
After this step you can create a new virtual device, Select Window > Android SDK and AVD Manager, click Virtual Devices. Introducing the Android Emulator, managing Android Virtual Devices (AVD)...

 

原文:http://www.helloandroid.com/tutorials/how-set-eclipse-android-sdk-ubuntu-linux-904910-updated

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.