Yes, it can be difficult to debug Android apps on Windows. The good news is, it doesn't have to be!
Hi All, I am trying to get my Parallels Visual Studio install to talk to the Android Studio Emulators on my MAC (for whatever reason I am struggling to start the windows ones as they ask for Hyper-V or whatever etc). Microsoft Device Emulator 3.0 is the third publicly released version of the Device Emulator for ARM-based devices. This emulator will also release with Visual Studio 2008. Device Emulator 3.0 will replace the executables and DLLs from previous releases (1.0 and 2.0).
If you are building cross-platform apps using technologies like Xamarin, the Visual Studio Android Emulator is your friend! In this video, I demonstrate how you can create a default cross-platform Xamarin.Forms app and start debugging it in about 3 minutes from start to finish! Here's what you'll need:.
A PC running Visual Studio 2015 (Community Edition works great). Make sure Xamarin tools and the Visual Studio Android Emulator are enabled in your Visual Studio install. A Xamarin account - if you are a student you can! You don't have to install the Android SDK which can save you a bunch of time and disk space! Here's what the emulator looks like running a default Xamarin.Forms app: Want to know more?
Here are some great resources:. Video:.
Deploy, test and debug Android apps with our fast, free, and best-of-breed Android emulator Microsoft Visual Studio 2015 includes an Android emulator that can be used as a target for debugging an Xamarin.Android app: Visual Studio Emulator for Android. This emulator uses the Hyper-V capabilities of your development computer, resulting in faster launch and execution times than the default emulator that comes with the Android SDK. The Visual Studio Emulator for Android can be used as an alternative to the default Android SDK emulator when developing a Xamarin.Android application.
Requirements To run the emulator, the computer must meet the requirements to run Hyper-V. Hyper-V requires a 64-bit version of the Pro edition of Windows 8, Windows 8.1, Windows 10, or higher. For more information about requirements, see Microsoft Visual Studio now has options for Android development: C, Cordova, and C# with Xamarin. When choosing one of those Android development options, Visual Studio will also install the brand new Visual Studio Emulator for Android to use as a target for debugging your app.
You can also. The need for an emulator for Android We know that emulators can play a key part in the edit-compile-debug cycle (bigger part than devices) and we believe that you need an emulator like the one we are releasing today.
Having a great emulator to debug against doesn’t mean you don’t need a device, and having a device to debug against doesn’t mean you won’t benefit from a good emulator. They are complementary. You definitely need to test against a device for the following scenarios which are unsuitable for any emulator:. Measuring the performance characteristics of your code. While an emulator can help you with correctness issues, it will never perfectly emulate the performance characteristics of your code running on the actual devices that you want to test against.
You want to measure the performance as your users see it. Testing hardware-specific issues. If what you are trying to test is the touch-responsiveness of your game, or the speaker quality for your media app, you will want to do that type of testing on the target devices. Ditto if you are trying to work around an OEM-specific bug. Purely evaluating the actual user experience in real-world situations, e.g.
Do your designed interactions work for a user walking around using your app one handed with just their thumb alone? For all other testing, which as part of your edit-compile-debug cycle normally takes at least 80% of your time, you’d want to use an emulator (barring other blocking issues or limitations with your emulator of choice). Use an emulator for the following reasons:. The majority of your testing is for correctness issues (not performance) and the majority of your code is probably not dealing with hardware specific issues. So use an emulator!.
You don’t want to spend a bunch of money buying a bunch of devices (and keep doing so every time a new device appears on the market), just to test things like screen resolution, DPI settings for different screen sizes, different API levels / platform versions, when you can configure that in software (in an emulator). You don’t want to have to take physical action with your device to test some sensor, e.g. Respond to movement or location changes or simulating network/battery changes. Instead you want to simulate the sensor values easily and quickly in an emulator, e.g. Simulate a trip to another town while your app responds to the change of location. There is also the convenience element.
Connecting to a device (typically dealing with cables), managing that connection and its lifetime, using one of your USB ports, is not as simple as launching the emulator and treating it like every other desktop application running on your dev machine. So emulators are great and can be a key part in the edit-compile-debug cycle and we want to make sure that our emulator is best-in-class. You have told us about several pain points with existing emulators that we are starting to address with our release:. Slow. This is the number one complaint we’ve heard from Android developers.
“The emulator is painfully slow, it hurts my productivity, and I’ll use a device.” Slow is not acceptable. If anything, using the emulator should be faster than using a device so you can test your scenarios faster (remember, you are not using emulators to test the performance of our code, you just need them to be as fast as possible for your own use). Conflict with Hyper-V on Windows. Many emulators require you to disable Hyper-V or don’t work as well with Hyper-V as they do without.
Using Hyper-V is part of the development setup for many developer activities, so asking you to restart your machine (multiple times a day) to toggle Hyper-V is not acceptable. One specialized variant of this is using the Windows Phone emulator (which itself is based on Hyper-V). It is a real pain having to make changes and reboot every time you want to switch from an Android emulator to a Windows Phone emulator to test your cross-platform code. Additional acquisition and installation step. If your main development environment is Visual Studio, you don’t want to have to acquire the emulator separately and follow a separate installation process.
Separate cost. Having a great emulator that can cost you as much as your main development environment is not an option for most. The Visual Studio Emulator for Android comes with VS without additional charge and is also free when acquired without VS. In short, we will address all of those pain points with the Visual Studio Emulator for Android.
![Emulator Emulator](/uploads/1/2/5/4/125499037/818468455.png)
Now, let’s recap Visual Studio’s debugging story for Android and how to choose the VS Emulator for Android. Debugging against the Visual Studio Emulator for Android With Visual Studio 2015 you can target Android and edit-compile-debug regardless of your choice of programming models:, or C# with Xamarin. With all three of those choices, when you start debugging, you must first choose a target. That target can be a device, or it can be one of many emulators that you may have running on your machine.
Let’s see how to choose a debug target for Cordova, C, and Xamarin in Visual Studio 2015. To target the Visual Studio Emulator for Android, you can either select one of the pre-installed device profiles that appear in the Debug Target dropdown or use the Emulator Manager to install and start a different device profile (see the “Device Profiles” section below for more on that method). With C projects, the Debug Target dropdown looks like this.