Android Development Environment configuration (taking windows as an example), android

Source: Internet
Author: User

Android Development Environment configuration (taking windows as an example), android
Android Development Environment Configuration Tool

If you are going to be engaged in Android development, you can configure the Android development environment by referring to the following steps, whether you choose to develop in eclipse or under AndroidStudio.

Android Development Environment configuration process 1. Prepare a notebook or desktop

Using a notebook or a desktop computer depends on your individual needs, but I want to emphasize that you should not be soft on configuration and be willing to start. A smooth computer won't drive you crazy in boring programming.

The android studio or eclipse running environment officially recommended has very low requirements on computer configuration. Currently, almost all the computers on the market can be reached. However, if you stop using the officially recommended configuration, it will surely get stuck!

My personal computer configuration is as follows:

Download Android development tools and configure the development environment. Before getting started, we recommend that you set up independent folders for related tools, and set a general folder for all subfolders at the end. My file storage directory is as follows, for reference only:

 

2. Build a Java Development Environment

Android development must support the Java environment.

Official download of Java development tools (JDK. If the download link becomes invalid one day, you can find it on Baidu ). I will not go into details about how to download and install the next Java development tool.

It is worth mentioning that, for Android development in AndroidStudio or eclipse, you can install the downloaded installation package without configuring any environment variables manually.

3. Prepare core Android development tools 3.1 first, a basic toolkit is required:

Download the SDK-AVD-tools basic Toolkit (if the download link is swallowed up one day, contact the blogger)

Decompress the downloaded compressed package and place it in the corresponding directory (see the recommended location in the figure ). This folder contains the following content:

Among them, tools, also known as SDK Tools, includes the Adb tool, Draw 9-patch tool, Android simulator and other practical tools. AVD Manager is used to create and manage mobile phones, tablets, smart watches, and other simulators. SDK Manager is used to download and update platform tools, compilation tools, source code, documents, and simulator installation packages of various Android versions.

3.2 use of SDK Manager

If you use the SDK Manager provided above, you will find that only the Android SDK Tools shows the Installed status, and other shows Not installed. The Android SDK Tools is what is in the tools above. Because there is only one folder, it can only be detected that it is installed.

Note: If you find that you cannot smoothly load the tool list or load the tool abnormally slowly when you open the SDK Manager, your network problems will be ruled out, that is, the official website that provides the tool will be blocked, at this time, you need the proxy to go to FQ. If FQ is not used, domestic images will be used. The only defect is that the official website is not updated in a timely manner, but normal development will not be affected at all.

Set the method to access domestic images: Click Tools on the SDK Manager toolbar, select Options..., and then follow the configuration: (for more image addresses, see the website at the end of the article)

Next we need to download other tools. Before downloading the SDK, briefly introduce the functions of the tools in the SDK Manager directory:

Tools directory (required Tools ):

Android SDK Tools (required, the latest version): As mentioned above, the version with rc is a preview version.

Android SDK Platform-tools (required, the latest version): Starting from android2.3, some general tools for various Android platforms, such as adb, and aapt, aidl, and dx, it is divided here.

Android SDK Build-tools (required, the latest version): Android Project Build tool.

Android xxx (API xx) Directory (available for various platform development tools ):

Documentation for Android Sdk (optional): some offline documents on the Android developer's official website. However, downloading and opening are slow, and the domestic image address will be provided later.

SDK Platform (required): the development tool of the corresponding Platform. You can download the development tool under the Platform.

Samples for SDK (optional): the built-in Android sample program, which is recommended for installation.

Sources for Android SDK (optional): source code of Android API. It is recommended to install it.

Xxxxxxxx Image (optional): All the things ending with an Image support the simulator of the corresponding platform. Let's think of it as a refresh. (You do not need to install the virtual machine without having to bring it in. We will introduce a better Virtual Machine later)

Extras directory (optional extension ):

Android Support Libraries.

Android Support Repository (required): it is convenient to use Android Support Libraries in gradle, because Google does not publish these Libraries to maven center or jcenter, instead, Google's maven repository is used.

Intel x86 Emulator Accelerator (HAXM installer) (optional): an Intel x86 simulator acceleration tool for windows. It can be used with Intel x86 atom System Image to speed up the running of the simulator. (Personal feeling is still very slow)

In addition, those starting with Google support related Google services, which are generally unavailable for beginners.

The tools to be downloaded under the SDK Manager directory are as follows:

3.3 Use of AVD Manager (you do not need to read this section without having to bring your own simulator. I do not recommend using the built-in simulator currently)

As mentioned above, AVD Manger is used to create a management simulator. The following describes how to create a mobile phone of Android 6.0:

4. test with a simulator or a real machine

As mentioned above, we do not recommend using the built-in simulator. Here we recommend using the Genymotion Simulator for preliminary testing. to release it to a real machine, you need to use a mobile phone or tablet for testing.

4.1 The use of the Genymotion simulator requires the cooperation of the VirtualBox virtual machine.

Official download of VirtualBox

Download Genymotion from the official website (this official website is sometimes opened and sometimes cannot be opened... Please note that you need to register this product and select the free version !)

If the above link is swallowed up, download it from my online drive: VirtualBox and Genymotion.

4.2 VirtualBox Virtual Machine Installation

This virtual machine is easy to install. Just click Next. It is powerful and allows you to create runtime environments for various systems.

4.3 Genymotion simulator Installation

You can also install this virtual machine. Pay attention to the configuration after installation. Click to enter the configuration page: Settings

The tabs are used to set Account information, Network proxy information, and VirtualBox to set the download location of the virtual driver,It has nothing to do with the installation location of the VirtualBox above,ADBSet the SDK path to the SDK-AVD-tools Folder above., Misc sets the screen storage location and clears the Virtual Machine cache.

After these configurations are complete, go to the Add page and Add the virtual machines (with mobile phones and tablets) for each brand of mobile phones ).

Note: If the account cannot be logged on, or the virtual machine information cannot be loaded, or you do not respond after clicking download, try multiple times, especially if the connection probability is high at night. If not, use a proxy. Here we provide an available proxy:

4.4 real machine debugging

If you are using a real machine for debugging, be sure to enter the developer mode, select the USB debugging option of the device, and connect to the computer to install the driver. I feel that direct connection can only be installed with a storage device driver, but cannot be installed with a USB driver, in this case, you need to use third-party applications such as the 360 driver master, 360 mobile assistant, and pods to search and install them. If a fault occurs during driver installation, you can solve it by Baidu.

5. IDE installation Configuration

Currently, the commonly used solution for IDE selection is AndroidStudio or eclipse + ADT plug-in. For which solution is better, Baidu depends on your individual needs.

5.1 AndroidStudio Solution

This IDE official website cannot be opened, Google 404, you know, unless FQ, here is a Network Disk: AndroidStudio Network Disk download

After downloading the SDK, decompress it to the corresponding folder. When you start the SDK for the first time, you must provide the configuration information (select the default one) and set the path of the SDK. If the IDE and tools are updated during use, a prompt is displayed for pushing.

5.2 eclipse + ADT Solution

ADT is an android plug-in developed under Eclipse. The following code is provided first: Download the eclipse and ADT online storage, and the extracted password is 3552. Of course, you can also go to the official website to download the correct version.

Configuration process in this solution: Install the ADT tutorial offline in eclipse and configure the SDK directory of eclipse

6. Plug-ins and Proxies

See the following for details:

Install Genymotion plug-in for Android Studio

Install Genymotion plug-in for eclipse (it is likely that the target address cannot be connected)

The main purpose of installing this plug-in is to directly open the Genymotion simulator in the IDE, without installation or impact on use.

Because many official websites are walled, they need to be accessed by proxy. If there is no proxy, the following two websites may be used:

Android development tools and Related Images

Android developer website Image

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.