How to quickly create an Android emulator _android

Source: Internet
Author: User

Debugging a mobile application is usually implemented using a simulator, just because it is too cumbersome to post to the phone every time. Once the application is debugged on the emulator, it's OK to post to the phone to run the verification.

First, the simulator creation method

In order to observe the results of the operation in the simulator, you need to create the emulator before creating the Android application. There are several ways to do this:

Option 1: Enter the ANDROIDSDK installation directory (D:\ANDROID\ANDROID-SDK) and run AvD Manager.exe.

Option 2: Run VS2015, and then run the Android emulator Manager:

Option 3: Click the shortcut key in the shortcut bar to start AVD Manager:

One or more of the above three options can be selected.

Second, the emulator configuration has been created

If you are debugging a computer environment that is Intel's CPU, you can create the following simulators (AMD's CPU can choose a different template):

Among them, the first two with GPU acceleration (commonly used, fast boot speed), the last without GPU acceleration (slow startup, only for playing to see if the GPU acceleration, in the end how slow).

Note: When configuring the simulator, the "MV Heap" must choose the default value of 64, change to other values may occur although the simulator is started but still occasionally can not find the simulator.

For example, the Galaxy_api23_x86 emulator is configured as follows:

It is recommended that the Intel Cpu,galaxy model's mobile simulator RAM option be set to 768MB. On Win7, when the emulator RAM is set to greater than 768MB, some computers may be unable to start the emulator properly when using GPU acceleration. If this happens to your computer, you can reduce the capacity of the RAM option to 768 or 512 (which can cause slower running). However, if the RAM is set to a 1024MB emulator, it can still start normally, in which case the RAM capacity is not reduced.

Third, the simulator creation step

The following is an example of the Android 4.4 (API 19), which describes the specific creation process (similar to other emulator creation processes).

The API 19 simulator works as follows:

The Android 4.4.2 Simulator can use Chinese character input (google Pinyin input method), while the Android 5.0 and later simulators are not able to use Chinese character input, only in English test run effect.

Of course, you can also create other types of emulators, such as:

1. Create galaxy_api19 Simulator

Run the AVD Manager.exe file under D:\ANDROID\ANDROID-SDK.

In the pop-up window, create a AVD (Android Virtual Device, abbreviated AVD) and configure the corresponding options (see above).

Note the following settings:

RAM: using the default 1024.

Camera: The rear is simulated (and can be used in the webcam mode of the notebook).

Skin: Select "No Skin", that is: Do not let it appear on the right side of the window keyboard interface. VM Heap: Using the default 64. Be careful not to modify this value, or you may have a situation where it does not start properly or if the emulator is started but still cannot be found. SD card: Set to 256 or 512 is OK. The larger the value, the more programs or data can be saved on the external memory card, but the startup will slow down correspondingly. Check the "Use Host GPU" option, which is: Enable GPU acceleration.

Click OK to complete the emulator creation process.

2. Start simulator

Select the emulator you just created and press "Start" to run. The simulator will be slow to start for the 1th time (it will be quick every time you restart it).

3. Modify language and time zone configuration

After the startup completes, run "Settings" and modify the configuration information such as the time zone for language and DateTime.

4, modify the developer option configuration

When you start, select Dev Tools à developer options, and then set the options to the following:

L Force GPU rendering: Open "with Texturemapview test with GPU accelerated Baidu Map application, this option must be open"

In addition to the above options, the default values are used for all other options.

5. See if GPU acceleration is successful

Create a blank App (Android) project, select the emulator you just created, and then press <F5> Debug.

Observe the Output window if the last line of information is:

Hostconnection::get () New Host Connection established ...

Indicates that the GPU accelerates successfully.

If the GPU acceleration fails, check and change the emulator settings, and then turn off the emulator, and then press <F5> again to run and observe until the GPU accelerates successfully.

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

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.