Where are my Visual Studio Android emulators? - android

I'm just starting Jesse Liberty's new Pluralsight course, "Building Your First Mobile Application with Xamarin.Forms and Visual Studio 2017" and I'm running into a problem right out of the gate.
In the video, Jesse creates a new Xamarin.Forms project, modifies the XAML a bit, and runs it. Here is a screenshot of his list of emulators:
I've disabled Hyper-V, and installed the latest Intel HAXM.
I've followed along step-by-step, using the latest version of VS2017 (installed yesterday, no updates available), and I've used the Android SDK Manager to install the SDK Platforms APIs 23 - 27. More specifically, I've installed every available option for Android 6 (API 23), which is what shows in Jesse's list.
I have set the following Android project Properties:
Application :: Target Framework = Use Latest Platform (Android 8.0 Oreo)
Android Manifest :: Minimum Version = Android 6.0 (API 23 - Marshmallow)
Android Manifest :: Target Version = Android 8.0 (API 26 - Oreo)
When I open the dropdown, I don't even see the VisualStudio_android emulators at all, and I'd assume they come preinstalled with VS2017 when I install Xamarin, but no:
I have no idea where to get the Visual Studio emulators; but, as I understand it, they run much faster than others so figuring this out will probably be worth my time.
The Android Virtual Device (AVD) Manager doesn't list the VS emulators, so I can't add them from there. I know there is an Android emulator from Microsoft but it says it's Hyper-V compatible, and I've just disabled Hyper-V to use the other emulators. Is this a good choice? Are these the emulators I'm missing?
I'm out of ideas - what's my next step?

They have been renamed to streamline development. We only install a minimal amount of emulators. They used to be named visualstudio_ and now just android_ but you can create as many as you want.
I use intel haxm x86 emulators from google.

It turns out, the emulators weren't installed for some reason when I installed VS2017 and the Mobile Development Workflow.
I went into the "Individual Components" tab in the Visual Studio Installer, checked the emulator boxes, and all the emulators show up fine now.

Try uninstalling visual studio and then installing it again (save your projects first) and make sure that you install the Microsoft Visual Studio Emulator for Android. Check everywhere in the installation guide (Specifically under Cross platform mobile development). You might have missed it during your installation process.

Related

android studio times out installing the app

I have a question about running an app through the emulator on android studio.
My emulator device is able to turn on, but when running the app, install never completes so the app times out. I have tried invalidating cache and restarting, and I have installed the sdk platforms that are the same as the emulators and project, but these changes did not work. My computer cannot install emulator hypervisor driver for AMD processors or intel x86 Emulator accelerator, but I don't think it is necessary for the app to run since my emulator can turn on, right? also, any app has never successfully run on android studio.
The is no code other than the hello world that comes up automatically. This is an empty project with a minimum sdk of api: android 4.1. The device I am using is a pixel 2 with an api of 22. (size on disk 3.5 GB) for tools, I have android SDK build-tools 33, android emulator (31.3.10), and android sdk platform- tools (33.0.3) installed.
I have tried every forum that has the same issue as me but if you think there is one that can help me, please share it thanks.
Android Emulators aren't always the best so expect random failures. This is what I would try:
Make sure the app compiles properly (make sure you see BUILD SUCCESSFUL in your bottom "Build" Tab in Android Studio)
Make sure you have updated Android Studio and Android Emulator, Android Build Tools, SDKs etc.
Create and use a device with a higher API version. Ideally one with Play Store.
Depending on your development machine you might want to try a different architecture (ABI). Try x86 or x86_64 instead of what you've already tried.
In rare cases your existing emulator images get corrupted. Uninstall them in your SDK manager (Show Package Details) and install them again.
If possible try running the app on a real device (follow online instructions to enable USB debugging etc.) to verify the emulator is the problem.

Can't run Visual Studio Emulator

Formatted my computer with windows 8.1 pro and upgraded it to windows 10 pro, both x64.
Enabled Hyper-V on BIOS and on Windows Features, but no success. Disabled and enabled again, rebooted and nothing... Also reinstalled Visual Studio Emulator for Android and never works.
Always I get the error "You have been added to the Hyper-V Administrators security group. Please sign out of your computer for the permissions to take effect" when I try to run a android device.
What could I do for solve this?
Screenshots below:
You should install Intel HAXM instead of enabling Hyper-V for the Android emulator. Only the Windows Phone emulators require Hyper-V, and HAXM and Hyper-V cannot be active simultaneously, which means that enabling one disables the other.
Also, dealing with emulators from Visual Studio itself is not recommended as it proved to be messy and unrealiable. Instead, you should manage the entire Android SDK and its emulators from the Android SDK tools standalone installer (not Android Studio). Follow these instructions to install the Android SDK tools 24 standalone GUI and immediately update them to SDK tools 27, which includes the latest Android emulators.
Then, create the emulators from Android AVD Manager, and start your desired emulator. Whenever you deploy to emulator from Visual Studio, it will use the already running emulator, so you don't need to choose one from VS itself.

Emulator on Android SDK failed to start on Windows 10 Pro

I am working with Ionic Cordova project and trying to run emulator. I am using trial version of windows 10 pro, till now didn't put license, it is trial only. though Android studio, Java sdk, and Android-SDK installed correctly but when trying to start emulator (for a correctly created virtual image) it is failing to start. It is visible for 1 seconds after that it is never visible. In-fact event viewer also not showing any error log. is it due to trial version of win 10 pro? I have no clue why it is happening?
I have tried by both installing hyper-v and once unstalling hyper-v, but none worked. I am not sure if hyper-v feature should be on or off. What is correct way?
How did you install the emulators and SDK exactly? What Android SDK version is the emulator based on? Are you really using Visual Studio and the Tools for Apache Cordova? What VS version, cordova and cordova-android versions?
If you see emulator icon, but don't see window, just recreate emulator. This is because of bugs with emulator position (when emulator window is off-screen).
Anyway, try recreating virtual device

Xamarin wont deploy to Android emulator no errors

I am new to Xamarin and ran into immediate trouble while doing a basic Hello World example. When I click Debug, the Android emulator starts but never finishes even after 20 minutes. The emulator just sits on a black screen. I never see the Android boot sequence. I can build the solution with no errors. I can also open the emulator by itself through AVD without any errors. My laptop is VS 2017 Community, Win10 Fall Creator, i5-6200, 8GB RAM, GeForce 940M, and 50GB free on SSD. I have tried:
Reinstalling VS
Reinstalling Java SDK and Android
Updating Android SDK packages
Changing registry location of SDK
Turning off Fast Deploy
Creating new AVD's
Try updating your SDK's its under Tools > Android > Android SDK Manager.
This happens to me before, i did reinstall only to find out it was the emulator issue. to avoid yourself in reinstalling the visual studio and save you time... you can try it on your actual android device. then let me know how it goes. hope it helps.
After wasting many hours on this, I finally can across the answer. You can't use the standard AVD and SDK managers. Google removed support for them after SDK Tools version 26.0.1. https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/
If you need to make an Oreo 8.0 or 8.1 emulator, install Xamarin Android SDK Manager. Caution, this will prevent you from using the built-in AVD and SDK managers. From then on, you will use this new SDK manager and the command line to create and launch AVD's.

Xamarin.Forms Visual Studio 2017 project does not deploy

I am new to Xamarin. I used Xamarin. Forms template to create a sample mobile solution in Visual Studio 2017. The process created four projects Xamarin PCL, Xamarin Android, Xamarin.iOS and Xamarin.UWP. Without making any modification to the generated solution, I am trying to run it.
The first issue is, when I set the UWP as the starting project, the Windows emulator shows up and runs the app perfectly. But when I try to do the same with Android, I get different errors at different times based on the environment changes I make. Finally, using the visual studio android emulator, the Phone UI shows up but not my app. In the background, I can see that Visual Studio completed the build process successfully without any errors but the deploy process simply hangs. I left the deploy running overnight but still running in the morning. Here is my environment.
Intel Core i7 processor
Virtualization enabled in BIOS
Windows 10 Education
32GB RAM
Hyper-V disabled in Windows
Executed bcdedit /set hypervisorlaunchtype off in the command window and rebooted.
I tried setting the above environment in different combinations but none of them seem to make the app work. When I use an android emulator from android SDK, the build process throws errors. The only emulator that even builds is the visual studio emulator. But the deploy hangs.
A second issue I have is, I have installed android SDK for version 24 and 25. But in the emulator dropdown, I can only see the emulators for 23. I checked the installation path both in visual studio and android SDK manager and they both point to the same installation folder. What do I need to make the emulators for version 24 and 25 usable?
I repeat, I did not make any change to the generated solution in visual studio before running it. I have been at it for the past three days and couldn't make it work. Please help.
I just installed Visual Studio 2017 (on Win10 15063.138) and found, like you, Xamarin projects won't deploy to Android. Here's how I got running:
Updated everything in the Android SDK Manager.
Installed the new, improved Android Emulator from MS:
https://www.visualstudio.com/vs/msft-android-emulator/
Used that to download/install an API level 23 (6.0 Marshmallow)
emulator
Started that emulator using the same tool (you'll see it running in Hyper-V Manager)
Selected same emulator in VS for deploy/debug (the emulators that ship with VS are painfully slow)
In VS, selected Android project for start-up and verified build and deploy to Android in build config mgr.
Note: MS doesn't appear to have any emulators above API level 23, so Compilation and Target settings for your Android project can be the latest, but the minimum target will have to be 6.0 (API 23).
After pulling my hair for the past few days, I finally got my Xamarin.Forms Android App to show my page on the emulator. Thanks to all the members for their suggestions. Ryan's suggestion helped a lot ( I +1ed him, thanks Ryan) but did not solve my problem. I googled further and found a suggestion that asked to change the following setting which did it for me finally. So, if anyone else get stuck like I did, please do the following (in addition to cleaning up and updating all packages):
Open up the setting for your Hyper-V vm for your emulator (while the VM is off).
Expand the Processor node on the left and click on "Compatibility".
Now put a check mark on "Migrate to a physical computer with a different processor version" on the right.
Start your emulator in the Visual Studio Emulator tool.
Now, start debug your android project in VS using the same emulator that is already running.
After a delay (there is always a delay), your app will show up on the emulator. Yey!!

Categories

Resources