A detailed illustration of the Android development environment

Source: Internet
Author: User

The so-called Android development environment, mainly the following two components, Android software Developer Kit (Android software Development Kit) and Eclipse (editor, provides a lot of convenient features) two chunks, the following describes their installation method.

Install Eclipse

To install Eclipse, first install the Java Developer Kit (Jdk,java Developer Kit) and the Java Runtime Environment (Jre,java Runtime Environment).

Install with the Pacman Package Manager ArchLinux comes with:

Shell Code
    1. $ sudo pacman-s jdk JRE

If you use Ubuntu, you can install it with Apt-get. However, before installing the JDK and JRE, install the Ia32-libs package first, for reference: Http://developer.android.com/sdk/installing.html#troubleshooting.

After the JDK and JRE are installed, you can start installing eclipse:

Java code
    1. $ sudo pacman-s eclipse

After the installation is successful, you can try opening eclipse.


Wait a while and work on eclipse, but let's move on to installing the Android SDK before we finish installing eclipse.

Install the Android Software Development Kit (SDK)

To install the Android SDK (, to http://developer.android.com/sdk/index.html First, select the appropriate package to install according to your system.

This assumes that you are using Linux and download the android-sdk_r11-linux_x86.tgz (R11 is the version number, there may be a change) to unpack the package:

Shell Code
    1. $ tar xvf android-sdk_r11-linux_x86.tgz

This completes the first step in the installation of the Android SDK, which is said to be "the first step" because the package, called the Android Developer Kit Starter, is just a part of the entire Android development kit. , a fully operational Android SDK with the following three components:

    • Android SDK Tools
    • Android SDK Platform-tools
    • SDK Platform Android

Android SDK Tools is the package we just downloaded, providing debugging and testing tools for development (detailed list: http://developer.android.com/guide/developing/tools/index.html# TOOLS-SDK), and provides update functionality for the entire Software toolkit.

Android SDK Platform-tools, which provides the software needed for the platform (i.e., different versions of Android).

The SDK Platform Android,android platform, the core of the SDK, provides the libraries and code needed for development, with a sub-version (e.g. 2.2, 3.1, etc.).

Android SDK Tools we have downloaded and now want to use it to get Android SDK Platform-tools and SDK Platform Android.

Run SDK Tools:

Shell Code
    1. $ mv Android-sdk-linux_x86/android # Renaming a file set for convenience
    2. $ CD android/tools/
    3. $./android

Then there will be a window bouncing out and you can switch to "installed packages" to see if those packages are installed.

At first, only Android SDK Tools (which is the one selected in the picture, there are two other ones because I have installed).


The next task is to install the Android SDK Platform-tools and SDK Platform Android, select "Avaliable Packages", you can see there are many optional packages.

The Android SDK Platform-tools is to be installed , and the SDK Platform Android has a number of versions, you can follow your own choice to install, not all installed, but at least to install a, or can not run the program, such as 2.2,3.1,3.2 and so on, choose a suitable for you to install.

The choice of the SDK Platform Android version is best based on your reference material, such as if you are looking at the 3.x version of the book, you use 3.x version, and if you are looking at the 2.x version of the book, you install 2.x version, otherwise it may cause trouble.

"Learning Android" is using version 2.2, so I'll install version 2.2.

Check the Android SDK Platform-tools and your selected SDK Platform Android before clicking "Install Selected", wait for the download and installation to complete, then switch back to "installed packages", Make sure the package you just selected is already installed.


(Note that as a demo, I checked the 2.1 version of the SDK Platform Android as, nor did you check the Android SDK Platform-tools because I have already installed it.) )


Continue installation of Eclipse

Just now I said that the Eclipse Editor installation is complete, but the editor is not enough, because Eclipse provides a lot of useful plug-ins, can be used when we develop the Android program, so we also have to put the relevant plug-ins, This way, you can write code to achieve a multiplier effect.

Open your Eclipse and click Help, Install New software on the menu bar ...

In the popup dialog box, click the "Add" button,


In the box that pops up, fill in the Name field with an Android Plugin, and in the Location field, copy the following address into it:

https://dl-ssl.google.com/android/eclipse/

Then, back to the previous window, you can see that several packages have appeared, tick them, and click on the "Next" button.


Then click on the "Finish" button, the plug-in installation is complete.

What if the plugin is faulty?!

If Eclipse detects that a dependency is not met, it will prompt for an error (below), asking you to resolve the dependency. (I personally don't think it's stupid to solve the dependency on its own.) )

(My error message here prompts me, I tried to repeat the installation of the plugin already, because I have installed all the plugins)


Things can never be smooth sailing, software is the same, but this is life AH ~

If you have the following errors during the installation process, follow my steps to resolve these issues.

Error_info Code
  1. Cannot complete the install because one or more required items could not be found.
  2. Software being installed:android development Tools 11.0. 0.v201105251008-128486 (com.android.ide.eclipse.adt.feature.group 11.0. 0.v201105251008-128486)
  3. Missing requirement:android Development Tools 11.0. 0.v201105251008-128486 (com.android.ide.eclipse.adt.feature.group 11.0. 0.v201105251008-128486) requires ' ORG.ECLIPSE.GEF 0.0.0 ' but it could wasn't be found

In this case, you do not have a plugin called "GEF", and you can solve this problem by adding this plugin.

Just like you add an Android plugin, click the Add button, copy the name of the GEF plug-in and its address, and click Next to install the GEF plugin.

The address of the GEF plugin is http://download.eclipse.org/tools/gef/updates/releases/


OK, then you can try to install the Android plugin again, select the previously populated Android plugin option in work with, and then try to perform the operation again.


Plugin or Error!

And I almost roar!! After installing the GFE plugin, I tried to install the Android plugin, but Eclipse also gave an error, this time the message is:

Error_info Code
  1. Cannot complete the install because one or more required items could not be found.
  2. Software being installed:android development Tools 11.0. 0.v201105251008-128486 (com.android.ide.eclipse.adt.feature.group 11.0. 0.v201105251008-128486)
  3. Missing requirement:android Development Tools 11.0. 0.v201105251008-128486 (com.android.ide.eclipse.adt.feature.group 11.0. 0.v201105251008-128486) requires ' Org.eclipse.wst.sse.core 0.0.0 ' but it could wasn't be found

Fortunately, with the previous experience, we have been able to calm a little bit corresponding to this kind of problem, this time the solution is more ingenious, we take three steps:

1. Click the Add button to copy the address below, name Helios, then confirm: Http://download.eclipse.org/releases/helios

2. Click the "avaliable software Sites" link below the Add button, and in the box that appears, place the Gogo of the Helios on it and confirm. (Note that there is no need to install Helios of any plug-ins, add the address, and then click the link, tick, confirm, you can.) )

3. Select the previously populated Android plugin option in work with, and then try to perform the installation again.

The three steps are illustrated below:

(1)

(2)

(3)

(4)

  finally ... After the Android plugin finally installs, we must also associate the address of the Android SDK with Eclipse so that eclipse can use the code inside the toolkit. Click "Window---Preferences" on the menu bar and click on the "Android" page on the left. Open the SDK Tools folder that you downloaded and unzipped in the location entry (I'm/home/huangz/android here), then click on the "Apply" button so your Android platform should be able to recognize it. In determining, everything OK.
Finally can start to create our Android project, not easy ah not easy ... Click on the menu bar, "File--New", to find "Android Project"


If this is the time to pop up a Google, ask you to help feedback the SDK, ignore it first.

Fill in the project information, such as the name "HelloWorld", the package manager with its own domain name, my "Me.sideeffect", and then confirm.



The default project file is generated, then we can try to add a virtual machine, then we can simulate an Android phone on the computer.

Click "Windows---Android SDK and AVD Manager" on the menu bar


A pop-up interface is the development tool we used before, and now we're going to use it to create a virtual machine.

Click the "New" button on the right-hand menu.


After the options are more, the meaning of the following:

Name: Virtual machine names, whatever you want.

Target platform, choose your own Android version here, I am here in version 2.2.

SD Card: The size of the hard disk space inside the virtual phone can be set according to your needs.

Snapshot: Snapshot, after tick can support save the state of the virtual machine, so that you can save the settings like a real machine, do not have to reset each time, this option is also helpful to quickly start the virtual machine, but correspondingly, save speed will slow down.

Skin: The screen size of your virtual machine can be set according to your needs.

Hadrware: The hardware of your virtual machine can be set according to your needs.

When everything is done, press CREATEAVD.


After creating the virtual machine is naturally let him run up, select the virtual machine, click on the window start, and then there will be a window pop-up, generally directly press lanch on the line ~


Wait, wait.



Yes! It's finally done! Our bumpy installation journey is over.

Then you can start writing your Android app and start your Android Journey ~ Good luck!


Citation information:

Http://ofps.oreilly.com/titles/9781449390501/Quick_Start.html

Http://developer.android.com/sdk/installing.html

Http://blog.csdn.net/baby_nanhai/archive/2011/06/16/6549682.aspx

A detailed illustration of the Android development environment

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.