Configure the development environment for Android

Source: Internet
Author: User

When I first set up a development environment, I wrote down several issues that may cause problems for reference.

 

Required program:

 

 

Eclipse, Java IDE,: http://www.eclipse.org/downloads/

 

JDK: http://www.oracle.com/technetwork/java/javase/downloads/index.html

Many other materials are provided by Sun, because Oracle has acquired sun, so now the address has changed.

 

Android SDK,: http://androidappdocs-staging.appspot.com/sdk/index.html

In fact it should be http://developer.android.com, but this website was wall, it is really inexplicable. The above is an image site and can be accessed.

 

Installation steps:

 

1. Install JDK 6 Update 22 and the file name is jdk-6u22-windows-x64.exe. Download the version of the corresponding platform. I use a 64-bit system, so the file name is 64-bit. After the installation is complete, enter Java-version in the command line to obtain the following information:

 

Microsoft Windows [version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:/users/Administrator> JAVA-version
Java version "1.6.0 _ 22"
Java (TM) se Runtime Environment (build 1.6.0 _ 22-b04)
Java hotspot (TM) 64-bit server VM (build 17.1-b03, mixed mode)

 

2. Install the android SDK. The downloaded file name is {
Ondownload (this)
} "Href =" http://dl.google.com/android/android-sdk_r07-windows.zip "> android-sdk_r07-windows.zip, decompress to E:/Android-SDK-windows, and then run SDK manager.exe. A black window will pop up first, and then let you select the development kit to download. Select All, click Install, and then wait for it to download quickly. I started downloading in the afternoon and didn't finish downloading until the evening. Of course, you can also download only the desired platform, for example, only version 2.1 or 2.2. It takes about 1 GB to download all the files.

 

After downloading the SDK, you can run the simulator in the SDK to play with it, but you should finish the following work first.

 

3. Install eclipse. The downloaded file is named eclipse-jee-helios-sr1-win32-x86_64.zip and can be directly decompressed to a directory.

 

4. Install the ADT plug-in for eclipse. Start eclipse, run help-install new software, and click Add to enter the URL of the ADT plug-in:Https://dl-ssl.google.com/android/eclipse/. You need to install Android ddms and Android development tools. After installation, restart eclipse. A single offline installation package is also available on the Internet. The file name is adt-0.9.9.zip, and the file name can also be: Taobao.

 

The installation method using the installation package is as follows:

 

Create C:/program files/eclipse_java/myplugins/and C:/program files/eclipse_java/myplugins/androidadt/Eclipse/directory to copy all the files obtained from the unzip ADT-0.9.7.zip to C: /program files/eclipse_java/myplugins/androidadt/Eclipse/directory.

 

Create the C:/program files/eclipse_java/links/directory, create a text file androidadt. Link under the directory, and write the following content:
Path = C:/program files/eclipse_java/myplugins/androidadt

 

If it fails, delete the org. Eclipse. Update folder under the C:/program files/eclipse_java/configuration directory, and restart eclipse.

 

At startup, eclipse will go to the specified directory to find the eclipse/features directory and Eclipse/Plugins directory to see if there are legal functional components and (or) plug-ins. That is to say, the target directory must contain a/eclipse directory. If the attached feature and plug-in are found, the configuration is available during the runtime. If the linked file is added after the workspace is created, the additional feature and plug-in will be processed as new configuration changes.

Additional instructions
1. Plug-ins can be installed in multiple custom directories.
2. Multiple plug-ins can be installed in a custom directory.
3. The file name and extension name of The Link file can be any name, such as ddd.txt and myplugin.
4. In the link file, Path = the path of the plug-in directory must be separated by // or/
5. The link file can have multiple lines of Path = plug-in Directory, which corresponds to multiple custom plug-in directories. The path parameter of each line will take effect.
6. There can also be multiple link files in the links directory, and the path parameter in each link file will take effect.
7. The plug-in directory can use relative paths.
8. You can create a subdirectory in the links directory to transfer unused plug-ins to this subdirectory to accelerate eclipse startup.
9. If no plug-in is visible after installation, delete the configuration/org. Eclipse. Update/directory in the eclipse installation directory and restart eclipse.

 

5. Configure eclipse. Run eclipse and set the path of the android SDK so that eclipse can find the android SDK. Windows-Preferences: Open the android list, click the Browse button, select the decompressed Android SDK path, and click the Apply button. The installed Android SDK is displayed below.

 

6. Now you can create a new project. But run a simulator first. Run the SDK manager.exe In the android SDK, select virtual devices on the left, and click New on the right to create an AVD. Enter the device name, platform version, memory capacity, and screen resolution ...... Click launch. Wait for a while to display an Android phone screen.

 

When you run a virtual machine, you may not be able to run it. The prompt is "Unknown Virtual Device name. This is because the android SDK does not know Chinese and does not decompress the SDK to a directory with a Chinese path.

 

You may also be prompted: No search paths found in this AVD's configuration. This is because the environment variables are not properly set. Many XP or win7 systems now move the user directory from the default location of drive C to another drive letter, and when the simulator is opened, the configuration file is placed to the path of other disks, however, by default, the SDK is still located in the C drive path. The running path is displayed in the SDK manager.exe window, so an error occurs. You can add an environment variable namedAndroid_ Sdk_home. The value is the decompressed path of the SDK.

 

Previous figure:

 

It looks similar to a mobile phone. You can also drag a sliding screen, which is quite fun.

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.