Build an android development environment in Ubuntu

Source: Internet
Author: User


1. install and configure the Java environment

Detailed steps for installing and configuring Ubuntu Java

1. Download JDK

Download connection http://java.sun.com/javase/downloads/index.jsp

Select jdk-6u24-linux-i586.bin download, I downloaded the latest version, place the jdk-6u24-linux-i586.bin in the directory/home/candycai/work (this custom folder doesn't matter ).

2. decompress the file

Open the terminal and enter the JDK Directory: CD
/Home/candycai/candywork;
Change the File Permission to execute CHMOD.
+ X jdk-6u24-linux-i586.bin, so that the directory will appear jdk1.6.0 _ 24 files.

3. Configure Environment Variables

Sudo gedit
/Etc/profile, add at the end of the profile file

Export
Java_home =/home/candycai/candywork/jdk1.6.0 _ 24

Export
Classpath =.: $ java_home/lib/tools. jar: $ java_home/lib/dt. Jar

Export
Path = $ path: $ java_home/bin

This indicates loading the Java root directory, setting environment variables (Application Files), and setting environment variables (class files)

Then the system must be restarted!

4. view the version

Java-version

The results are as follows. For more information, see

Java version "1.6.0 _ 24"

Java (TM) se Runtime Environment (build
1.6.0 _ 24-b07)

Java hotspot (TM) server VM (build
19.1-b02, mixed mode)

Ii. Eclipse installation and Android
Install configurations

1. Download eclipse

: Http://www.eclipse.org/downloads/
, The latest eclipse I downloaded
IDE for Java, Which is eclipse-java-helios-sr1-linux-gtk.tar.gz.

2. Decompress

Decompress it to the directory set before/home/candycai/work. Double-click eclipse to start it.

Download android
SDK program package the latest (android-sdk_r10-linux_86.tgz.tar), extract it to your working directory, unzip the directory named android-sdk-linux_86, follow the previous method sudo
Gedit/etc/profile: add the tools directory in path. The modification is as follows:

Export
Path = $ path: $ java_home/bin:/home/candycai/candywork/android-sdk-linux_86/tools

3. Configure ADT

Start eclipse, menu help
-> Install new software... -> Select available on the tab
Software,

(Figure 1)

Click "add" on the right.
... ", The pop-up dialog box, set as follows:


Name: ADT


Location
: Http://dl-ssl.google.com/android/eclipse/

Click OK to return, and then click Select
All, and then click "Next" twice.
> ", Then there is a long wait, and my network speed is too slow.

You can also download the latest files and install them directly from the Internet, and find the latest adt-10.0.0.zip on the Internet. Follow the same method.


(Figure 2)

Then follow the steps to install it.

4. Set the SDK path

After eclipse is restarted, select Window
> Preferences..., in the open property box, select Android, In the SDK
Enter your android
The directory where the SDK is located, and then click Apply.
.
5. Set android
SDK and AVD Manager
AVD: Android Virtual Device

Select
Window -- android
SDK and AVD manager in the pop-up android
SDK and AVD Manager dialog box.


(Figure 3)

Select
Available
Packages, select the SDK package you want to install, and then press
Install
Select button to install.

Because the download process is too slow, I will download the installation package and the new SDK.

Android SDK offline Installation Method

Reference: http://www.cnblogs.com/candycaicai/archive/2011/02/25/1964881.html

The environment has been successfully set up through the above methods.

6. Create a simulator

Window-> android
SDK and AVD Manager
Devices, and click New… on the right ...", Add parameters as needed and create an SDK version simulator (for example, refer ). Click Create
AVD creates a virtual device that runs android. You can click Start ..


(Figure 4)

After creation, you can start and run the simulator:


So far, the entire construction process has ended. Now you can build your own Android project, from Hello
World started.

 

References

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

Http://hanhaotian87.javaeye.com/blog/755895

Related Article

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.