Ubuntu 12.04 Build Eclipse Android Development environment (RPM)

Source: Internet
Author: User

Ubuntu 12.04 builds Eclipse Android development environment

Http://blog.sina.com.cn/s/blog_93dc666c0101b39p.html

(2012-09-07 00:40:48) reproduced
Tags:ubuntuandroidlinuxeclipseit Category: Linuxubuntu

One, install the 32-bit library

1.

If Linux is 64-bit, the 32-bit library will not be installed, resulting in the inability to create an Android emulator.

$sudo Apt-get Install Ia32-libs

Second, install the JDK

1.

JDK is the Java development Kit,java Development Kit
: Java SE Development Kit 7 Downloads.

2.

Select Accept Licence Agreement and select the appropriate version to download.


3.

After downloading the path of my compressed package is,/home/sfchipan/download/jdk-7u6-linux-x64.tar.gz.

Now unzip it to the/usr directory:

$tar-zxv-f/home/sfchipan/Download/jdk-7u6-linux-x64.tar.gz-c/usr

4.

Sets the Java environment variable.

To open a file/etc/profile with a text editor:

$sudo Gedit/etc/profile

Copy the following text to the end of the profile file:

Exportjava_home=/usr/jdk1.7.0_06
Exportjre_home=/usr/jdk1.7.0_06/jre
Exportclasspath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar: $JAVA _home/lib: $JRE _home/lib: $CLASSPATH
Exportpath= $JAVA _home/bin: $PATH
Like this:

5.

Save/etc/profile, then log out of the current user and log back in, and the environment variable is in effect. Verify that the JDK is installed successfully:
#java-version

Third, download the Android SDK

1.

Android SDK, the Android software development kit,android Software Development Kit.

: Get the Android SDK

Select the Linux version to download:


2.

After downloading the path of my compressed package is,/home/sfchipan/download/android-sdk_r20.0.3-linux.tgz.

Now unzip it into the/OPT directory:

$tar-zxvf/home/sfchipan/Download/android-sdk_r20.0.3-linux.tgz-c/opt

Four, install Eclipse

1.

: Eclipse Downloads

As needed download, I use the textbook recommended to download Eclipse IDE for Java eedevelopers, so I am under this version.

2.

After downloading the path of my compressed package is,/home/sfchipan/download/eclipse-jee-juno-linux-gtk-x86_64.tar.gz.

Now unzip it into the/OPT directory:

$tar-zxvf/home/sfchipan/Download/eclipse-jee-juno-linux-gtk-x86_64.tar.gz-c/opt

3.

/opt/eclipse This directory user and user group to the current user group, such as my current user is Sfchipan, the user group is Sfchipan, enter the following command:

$sudo Chown-r Sfchipan:sfchipan/opt/eclipse

As mentioned in this article,/opt/eclipse and/opt/android-sdk-linux users are the same as the user group, and I followed this article to set the Eclipse directory and all of the following subdirectories and file users and user groups to root, The Android-sdk-linux user and user group is still sfchipan, and there seems to be no problem. But then I set up the Eclipse User and user group in order to Sfchipan.

4.

Create an Eclipse startup script under the/usr/bin directory:
$sudo Gedit/usr/bin/eclipse

Add the following to the content:
#!/bin/sh
Export Mozilla_five_home= "/usr/lib/mozilla/"
Export Eclipse_home= "/opt/eclipse"
$ECLIPSE _home/eclipse $*

Note: To appear like the same color can, sometimes directly copied paste into the text, the quotation marks are not English quotation marks "", but the Chinese quotation marks "", if this happens also need to be modified to English quotation marks.

Save the text.
Add executable permissions for the startup script:
$sudo chmod 755/usr/bin/eclipse

At this point, you can start the program by entering eclipse directly in the terminal, if you can't write off your account.

5.

Add an icon to the Dash homepage so that you can quickly launch the chart in Unity or in the Dock.

Terminal Input Command:
$sudo Gedit/usr/share/applications/eclipse.desktop

In the text, add the following:
[Desktop Entry]
Name=eclipse Platform
Comment=eclipse IDE
Exec=eclipse
icon=/opt/eclipse/icon.xpm
Terminal=false
Type=application
Startupnotify=true
categories=accessibility; Utility;
onlyshowin=unity;


Note: The color you want to appear in after copying it. If you have only one color after copying the text into Eclipse.desktop, you can do this:

$sudo Gedit/usr/share/applications/ubuntu-software-center.desktop

Open the. Desktop file for Ubuntu Software Center, and then copy the contents into Eclipse.desktop, and then follow the text above to modify it. It's a bit of a hassle, but it works.
Save Eclipse.desktop.

In this way, you can find eclipse in the Dash homepage.

Five. Installing the ADT Plugin

1.

ADT, the Android Development tools,android development tool.

Run Eclipse and at the top of the toolbar, select Help, Install newsoftware:


2.

The following interface appears, enter https://dl-ssl.google.com/android/eclipse/at the back of work with, carriage return:



3.

When you finish typing press ENTER, it appears as follows:

In the front box of two names, click Next;

4.


continue to next;


Select the I accept in the red box ... ;

Ubuntu 12.04 Build Eclipse Android Development environment (RPM)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.