How to use Vs's Android simulator with Android Studio or ADT

Source: Internet
Author: User

**

Using the Visual Studio Emulator for Android from Android Studio or Eclipse with ADT

**

How to use Vs's Android simulator with Android Studio or ADT

Original address:http://blogs.msdn.com/b/visualstudioalm/archive/2015/07/20/ You-can-now-acquire-the-visual-studio-emulator-for-android-on-its-own.aspx

Note: This article is mainly translated from the MSDN blog, not to translate, is to write their own understanding in Chinese, which is also my playing the simulator encountered problems, by finding this article to find a solution.

Since we released the fastest and free Android simulator based on Hyper-V, some people are still using ADT or Android Studio as a tool to develop Android apps, and they don't want to install vs to develop Android. At the same time, this group of lazy people also think Android comes with the simulator is too slow, want to use our Android simulator to debug the application, well, who let me so generous, today let me teach you how to under ADT or Android Use our Microsoft Android Simulator under Studio. Before you start, yell three voices: Microsoft Dafa is good! Microsoft Dafa is good! Microsoft Dafa is good!
With our Android simulator, we don't need to install virtual studio to see how good we are, we've already thought of this layer for you.

Here we go! Move small bench, sit well, look carefully oh. I just say it again ~

What the? Not yet download our fastest Android simulator in the universe? All right, here's your last chance. Download: Download the emulator directly here when installed, an icon appears in your Start menu or desktop with the name "Visual Studio Emulator for Android". Double click to open, will take you into the world of Microsoft. Here, will show some of the available emulator version and name configuration, etc., by default has installed the KitKat image, you can run directly, the other you will download it. such as: (I have a match)

First open, will let you activate, don't be afraid, no charge, is to let you login to Microsoft account. What is a Microsoft account, if you do not know, then you go to register a good, Big brother. If you don't want to log in, well, let you use it for 30 days. After entering the manager, click the Green Play button to launch the simulator.

How to make it work in as or ADT

First say Android Studio

Android Studio uses its own emulator by default, and we can configure it to choose our simulator.

    1. Open Android Studio, go to the Run menu, then click Edit configurations ...

    2. In Defaults/android application, set the target Device below to show Chooser dialog

      1. Tick the use same device for the future

This way, when you first debugging, you will be asked to choose a device that is already connected to the ADB.

Alternatively, you can set up a Quick Launch simulator button.
1. Click File > Settings > External Tools

2. Click Add

3. In the Create Tool dialog box, enter a name and description for the task, and then fill in the following information in program and parameters:

Program
Task Parameters
Quick-launch a particular profile C:\Program Files (x86) \microsoft Emulator Manager\1.0\emulatorcmd.exe /sku:android launch/id:[you want to start the device ID number]
Open Emulator Manager C:\Program Files (x86) \microsoft Emulator Manager\1.0\emulatormgr.exe /sku:android

* You can run the emulatorcmd.exe/sku:android list/type:device command in CMD to get the ID number.

4. Click OK to save your changes, then click OK to save all your changes.

5. Right click on Android studiand toolbar Customize Menus and to ...

6. Define where you want the new toolbar icon to appear, click the Click Add after ...

7. Under External Tools, select the tool you created and click OK

8. Click OK to close the Menus and Toolbars dialog box

All right, let's go, enjoy yourself!

Let's talk about the ADT Setup.

This ADT is set up in the same way as in Android Studio:
Click Run > Debug configurations ...

Select Always prompt to pick device as shown above

On the toolbar so configured, Run > External Tools > External Tools Configurations ...
Next fill in the parameters and descriptions, as above

The Quick Launch portal automatically appears in the Debug toolbar

Finally we are very happy to provide you with such a great tool, she can also use alone, but if you have any suggestions can also feedback to us, directly click on the manager of the smiley face on it
*
*

The point is that ...

-- I can not install the test program on the simulator according to the above settings, not afraid, continue to read the comments below the blog


This goods met with me the same problem ah, to see Bo main website: Https://msdn.microsoft.com/en-us/library/mt228282.aspx#ADB

This means that the simulator needs to find the ADB to link the device, if not found, then ADT or Android Studio Device Manager can not find her, the default ADB address is the Android SDK folder address, this is stored in the registry, if not, There may be no SDK for this default Android SDK address.

The workaround is to go to the registry, Hkey_local_machine\software\wow6432node\android SDK
This location, change its key value to the folder path of your local Android SDK. Don't forget to restart the simulator.

Above, if you install, VS2015, the default is to download the Android SDK to its default path, but, you know, need to climb the ladder ah, or download failed.

Finally, Microsoft Dafa is good. The simulator is really fast, fast, fast!

How to use Vs's Android simulator with Android Studio or ADT

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.