The beginning of any program should start from the development environment, so that you can do practical exercises, and after the completion of a quick project HelloWorld, haha, words not much to say, into the topic
The installation of the Android environment is mainly 3 steps:
1. Download and install the Android SDK
You can go to the official http://developer.android.com/sdk/index.html to download the Android SDK:
After the download is placed in the specified directory, after decompression can get the Android-sdk-windows folder, this is the SDK file we need, open the folder, do one of our most critical steps:
Install the necessary tools for Android development: After opening the Android-sdk-windows folder we can see that there is an SDK Manager.exe application file, double-click the file can appear the following interface:
This I have all the necessary to install, after the show is installed, otherwise the display is not installed, we now only need to check the installation and then click the Install 1 package button;
My installation is: the Tools folder under the Android SDK Platform-tools and Android 4.0.3 under all tool and other versions of the SDK platform can be
This installation takes some time to watch the news ...
At the end of the 2.SDK installation, we can install the IDE we developed, I chose Eclipse when I developed Android, abandoned the myeclipse that I used to develop, and felt that eclipse compared the original
This download does not say, go directly to the Eclipse official website to download, I download is eclipse-java-indigo-sr2-win32.zip, unpack after open folder inside have Eclipse.exe, because eclipse is free to install
So just double-click to open it, but directly using this pure eclipse for us to develop Android still have some problems, next we look at the third step
3. Install the ADT plugin in eclipse: First we go to the website http://developer.android.com/sdk/eclipse-adt.html for the ADT plugin download, I downloaded the latest version of the 18.0.0 version of the
Then we open the installed Eclipse and then click Help--->install New software on the menu
Click on work with: The Add button appears:
Click Archive to add the ADT directory, followed by the steps down the line, there is not much to say
After the installation is successful we can see a lot of new icons appearing on Eclipse
Open SDK---Open Avd--check project---New Android project---New Android test project---new Android XML file
This is an absolute majority of the Gaocheng, but the final step in Android development is to add the SDK to eclipse:
Window in menu catalog---->preferences---> Click android:
Add the SDK directory under the SDK location, which shows the correctly installed SDK added to the Eclipse interface, click the button below apply to
Our environment has been built, we started to build a new Android try:
Enter the project name in Project name and click Next
Select the SDK version support for the project, here I choose 2.3.3 version, then click Next, enter the correct package name in the following interface, similar to Java 2EE
So we've built a new project:
Let's not talk about the role of each directory, we run the project directly, first we click Open AVD,
If no new AVG is created, click New to create it:
After entering the necessary information, click Create AVG, then click Start
Click Launch to open the Android emulator, not much of this initialization time is still relatively long, you need to wait patiently:
Get the right Android interface, and now we can run our project:
Select the project right----->run as---->android application to run, wait a while to see:
Well, to this, our environment is a successful configuration is complete, then we can go on the actual combat study
But I encountered an error when I created the project: ' Xcopy ' is not a system internal or external command, nor is it an executable batch file, but the search lookup xcopy.exe exists under the C:\Windows\System32 folder of this machine.
There are two solutions: one is to copy xcopy to the Tools folder or the Platform-tools folder under the path of the Android SDK for Path declaration, and the second is to add the path C:\Windows\System32 in the system environment variable path. So that the Xcopy command can be called directly.