[#XAMARIN] Updating #Android emulators to work with #VisualStudio and #Xamarin

Working with Xamarin, I found myself with the following exception, building and running a demo:

Target device (emulator-5554) has an API level of 12, but this application has a minimum API level of 19 set.

The minimum API level can be changed in the project properties on the Android Manifest tab.

This error is given in our list of emulators for Android only we have available 2 virtual devices, in this case for API level 10 and 12.

image

So what we have to do is “install” or download new emulators that support in this case Api Level 19. Now it the time to search and run the Android SDK Manager.

Windows search quickly leads us to the Android SDK directory

image

And within the same we can already launch [SDK Manager.exe], which is the app who manages Android SDK resources we have installed locally. In the next image you can see I have selected resources for API Level 19 and I’ve decided to download a couple of images to work with them.

image

After a few minutes, the SDK Manager will finish the download and installation. Now you can close the Android SDK Manager and return to Visual Studio.

image

From the IDE launched the Android Emulator Manager in the option ‘ Tools / / Android/Open / Android Emulator Manager… ”

image

And we will see that we… still have only emulators for API Level 10 and 12. So that now create a new AVD with the definitions that we need. For this click on Create and for example, to create one for a Nexus 7 with the following configurations.

image

Once defined the values, we can already see the result of the process of creating the AVD.

image

It also appears in the list of AVDs

image

And you can launch it from the Android Virtual Device Manager

image

And we can see the emulator running within a few seconds

image

Note:At first glance, emulators for Android leave a lot to be desired when compared to the Windows Phone.

Now we can return to our Xamarin Android project and… when we select the device or emulator for testing, we have available the new emulator that we created in previous steps (should it now show up, a simple Visual Studio reboot will do the trick)

image

And now yes, Welcome to Xamarin Forms!

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...