Install Android SDK-Chinese tutorial (full version, including eclipse installation)

Source: Internet
Author: User
Tags ubuntu package manager
Install SDK

This section describes how to install the android SDK and set up your development environment. If you have not downloaded the SDK, click the following link to start downloading. Then, read the following documents to learn how to install the SDK and use it to create an Android Application.
Download SDK
Upgrade?

If you have used an earlier version of the development process, you can skip this page and read the SDK upgrade documentation.
System and software requirements

Use the code and tools of the android SDK to develop Android applications.

Required operating system:

* Windows XP or Vista
* Mac OS X 10.4.8 or later (x86 only)
* Linux (tested in Ubuntu dapper Drake)

Required development environment:

* Eclipse IDE
O eclipse 3.3 (europa), 3.4 (Ganymede)
+ Eclipse jdt plug-in (most Eclipse IDE packages are included)
+ WST (optional, but the features required by the android editor are included in most eclipse idemost Eclipse IDE packages.
O jdk 5 or JDK 6 (only JRE is not enough)
O Android development tools plug-in (optional)
O not compatible with GNU Compiler for Java (gcj)
* Other development environments or IDE
O jdk 5 or JDK 6 (only JRE is not enough)
O Apache ant 1.6.5 or later (in Linux and Mac environments), 1.7 or later (in Windows)
O Java GNU Compiler inconsistency (gcj)

NOTE: If JDK has been installed on your computer, make sure it is the version number listed above. Note that some Linux versions may contain the GNU Compiler of JDK 1.4 or Java.
Install SDK

After the SDK is downloaded, decompress the. ZIP file to a proper location on your computer. By default, the SDK file is decompressed to the android_sdk _ <platform >_< release >_< build> folder. this folder contains tools/and samples.

Note the name and location of the folder decompressed by the sdk in the system-when you install the android plug-in and use the SDK tool, you will need to reference this folder

You can add the SDK Tools Folder path to your path. As described above, the tools/folder is located in the SDK folder.

* In Linux, modify ~ /. Bash_profile or ~ /. Bashrc file. Find the PATH environment variable and add tools/as the path environment variable. If this line is not found, you need to add one line:
Export path =$ {path }:< your_sdk_dir>/tools in the Mac environment, search for. bash_profile in your home folder and process it like in Linux. If there is no. bash_profile folder before, you can create it.
** In windows, right-click my computer and select Properties ). on the Advanced tab, click environment variables. When the dialog appears, double-click the path in the system variables column ). and add the complete path of the tools/folder.

Add tools to your path so that you can run Android debug bridge (ADB) and other command line tools. You do not need to add the complete path for the tool path. it should be noted that if you upgrade your SDK to a different path, you need to remember to update your path to a new location.

Install the Eclipse plug-in (ADT)

If you want to use Eclipse IDE as the environment for developing Android applications, you can install Android development tools (ADT), a general plug-in that supports Android projects and tools ). the ADT plug-in contains powerful extensions, making it faster and easier to create, run, and debug android.

If you do not use Eclipse IDE, you do not need to download and install the ADT plug-in.

To download and install the ADT plug-in, follow the steps in your eclipse version.

Eclipse 3.3 (europa)

1. Start eclipse, and select help> Software Updates> Find and install ....
2. When the dialog box appears, select search for new features to install and click Next.
3. Click new remote site.
4. In the result dialog box, enter the name of the remote site (for example, Android plugin) and enter the site as follows:

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

Click OK.
5. You can see the new one added to the search list (and check). Click Finish.
6. in the following search result dialog box, select the check box Android plugin> Developer Tools. it will check the features: "android Developer Tools", and "android editors ". the features of the android editor are optional. If you choose to install it, you need the WST plug-in mentioned earlier. click Next.
7. Read the license agreement, Select accept the license agreement accept terms of the license agreement, and click Next.
8. Click Finish.
9. The ADT plug-in has no signature. You can click "Install all" to install it,
10. Restart eclipse.


Eclipse 3.4 (Ganymede)
1. Start eclipse and select help> Software Updates ....
2. In the displayed dialog box, click the "available software" tab.
3. Click Add site...
4. Enter the following address as follows:

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

Click OK.
5. Return to the available software view and you will see this plug-in. Select "Next" to Developer Tools and click "Install...
6. in the next installation window, select "android Developer Tools" and "android editors ". android editor features are optional, but installation is recommended ., if you choose to install it, you need to install the WST plug-in mentioned earlier on this page.
Click Finish.
7. Restart eclipse.

After the restart, update your eclipse preferences to the SDK Folder:

1. Select WINDOW> preferences... to open the properties Panel. (Mac OS X: Eclipse> preferences)
2. Select android from the left-side navigation pane.
3. Locate the SDK on the main interface and Click Browse... then locate the SDK folder.
4. Click Apply, and then click OK.

ADT installation troubleshooting

I. If you have any questions about downloading the ADT plug-in following the above steps, I would like to give you the following suggestions:

* In Step 4, try to change the remote Redirection URL to HTTP instead of HTTPS.
* If you are behind the firewall (corporate firewall), make sure that your eclipse proxy settings are appropriate. In eclipse 3.3/3.4, you can configure the Proxy from the main eclipse button window (in MAC, eclipse)> preferences> General> network connections.

If you cannot install the downloaded ADT plug-in to eclipse, follow these steps to download and install the plug-in from your computer:

1. Download the ADT compressed file (pressure-free ).
2. Follow the first and second steps of the default installation (as shown above ).
3. In eclipse 3.3, click New archive site ....
In eclipse 3.4, click Add site..., and then click archive...
4. Browse and select a compressed file that has been downloaded.
5. Complete the remaining process from Step 5.

To update your plug-in, follow these steps to replace the default descriptions.

Note that the "android editors" feature of ADT requires several optional eclipse components (for example, WST ). if you encounter an error when installing ADT, your eclipse installion might not include those components. for information about how to quickly add the necessary components to your eclipse installation, see the troubleshooting topic ADT installation error: "requires plug-in org. eclipse. WST. SSE. ui ".
Update ADT plug-in

In some cases, your current SDK may become suitable for your new ADT plug-in. You can follow these steps to update the ADT plug-in from eclipse.
Eclipse 3.3 (europa)
1. Select help> Software Updates> Find and install ....
2. Select search for updates of the currently installed features and click Finish.
3. If the ADT allows updates, select and install the updates.

Or:

1. Select help> Software Updates> Manage configuration.
2. Expand the navigation tree and select Android development tools <version>
3. Select scan for updates under available tasks.

Eclipse 3.4 (Ganymede)

1. Select help> Software Updates...
2. Select the installed software tab.
3. Click Update...
4. If the ADT allows update, select it and click Finish.

Installation notes
Notes for Ubuntu Linux

* If you need help to install and configure Java on your development machine, you can find the following resource help:
Https://help.ubuntu.com/community/Java
Https://help.ubuntu.com/community/JavaInstallation
* Here are the steps for Java and eclipsed. Android SDK and ADT plug-in are installed first.
1. If you use the 64-bit version on your development machine, you need to use apt-get to install the ia32-libs package

Apt-Get install ia32-libs

2. Next, install Java:

Apt-Get install sun-java6-bin

3. Ubuntu package manager does not provide eclipse 3.3 download now, so we recommend that you use eclipse from eclipse.org (http://www.eclipse.org/downloads.
4. Install the SDK and ADT plug-in according to the previous steps.

Notes for other Linux versions

* If you encounter this error when installing the eclipse ADT plug-in:

An error occurred during provisioning.
Cannot connect to keystore.
Jks

If your development environment lacks a suitable virtual machine, installing Sun Java 6 can solve this problem, and then you can reinstall the ADT plug-in.
* If JDK has been installed on your development computer, check the selected version listed at the top of this page. Some Linux systems include JDK or the Java GNU Compiler, android development is not supported.

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.