Ubuntu Build ECLIPSE+JDK+SDK android (reprint)

Source: Internet
Author: User
Tags gtk android sdk manager

Transferred from: http://blog.csdn.net/ithomer/article/details/6960989

Reinstall the Ubuntu system tonight and re-install a ECLIPSE+JDK+SDK Android development platform

Install an Eclipse environment

1 Download the installation package

Eclipse: Eclipse Official download website, or download eclipse-jee-indigo-sr1-linux-gtk.tar.gz directly

JDK: jdk official download website, or download jdk-7u1-linux-i586 directly. tar.gz

SDK: The official SDK download website, or download android-sdk_r15-linux directly. tgz

2 Unpacking the download package

Decompression Eclipse: tar zxvf eclipse-java-indigo-sr1-linux-gtk.tar.gz

Decompression JDK: tar zxvf jdk-7u1-linux-i586.tar.gz

Decompression SDK: tar zxvf android-sdk_r15-linux.tgz

Move jdk1.7.0_01 to eclipse directory: mv jdk1.7.0_01 Eclipse

3 Configuring Eclipse and JDK environment variables

sudo vi/etc/profile

Add at the end of the file:

Export java_home=/home/yanggang/eclipse/jdk1.7.0_01
Export JRE_HOME=/HOME/YANGGANG/ECLIPSE/JDK1.7.0_01/JRE
Export classpath=.: $JAVA _home/lib: $JRE _home/lib: $CLASSPATH
Export path= $JAVA _home/bin: $JRE _home/bin: $PATH

Source/etc/profile //Make environment variables effective

4 Creating a soft link for quick start

CD ~/bin

Ln-s/home/yanggang/eclipse/eclipse Eclipse

First look at the environment variables: Echo $PATH

If the environment variable does not contain/home/yanggang/bin, perform the following add environment variable operation;

Edit the. profile file for the current user (Yanggang)

Vi/home/yanggang/.profile

Configure Environment Variables Path

Path=/home/yanggang/bin: $PATH
Export $PATH

5 Rebooting the system Ubuntu

Source/home/yanggang/.profile (does not restart the system, the Source command is available)

Input: java-version

A Java version message appears stating that the installation was successful!

You can now start eclipse

Eclipse &


Two-installation configuration Android environment

1 Installing the Android development plugin

(1) Open eclipse, select Help->install New software--> Add on the menu bar

(2) Enter the URL: https://dl-ssl.google.com/android/eclipse/ ( If there is an error, please change HTTPS to HTTP)

(3) Next installation, restart Eclipse

2 Configuring the Android SDK

(1) Click on the menu window->preferences to enter the following screen

(2) Click menu window->android SDK Manager, Download SDK Toolkit

(3) Click menu WINDOW->AVD Manager to create the AVD simulator

Additional:

1) No Android SDK and AVD manager option under Eclipse windows

FIX: Customize perspective, Command Groups availability-> put Android SDK and AVD M in Eclipse window Anager option on-Hook, OK

2) terminal input adb, output "bash:/home/homer/bin/adb:no such file or directory"

Solution: you're using a 64-bit Linux, not a 32-bit runtime library, installing the sudo apt-get install ia32-libs

3) New Android project, "R cannot is resolved to a variable" error, delete gen and bin, or clean project, Gen is automatically generated R.java file

Workaround: because the ADB command is not available on 64-bit Ubuntu systems, project-build project generates Gen/r.java, reference 2) installs 32-bit runtime libraries, and then clean re-gen.

Reference recommendation:

Installing the SDK (Android Developer)

Windows Build eclipse+jdk+sdk Android

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.