Xamarin.Forms deploy to Android 11 emulator in Windows

I’m usually using the Android emulator while I’m working with VS, and today I was trying to build and deploy to a newly created Android 11 emulator with no luck.

As always, Stack Overflow to the rescue!

In this link, they comment that the problem is that with Android 11 we need a different way of sign the apk.

I didn’t found the option to do it using the UI, so, we need to add the following tag to our Android csproj file for the debug configuration.

<AndroidUseApkSigner>true</AndroidUseApkSigner>

I also needed to disable the use of Shared Runtime and Fast Deployment in the Android project properties

After all the changes, my app is deploying to the Android 11 emulator without issues!

Using Azure Storage Explorer

It’s a free tool to access you Azure cloud storage from your desktop computer.

Install

You can download the installer here.

Run the installer and select to install it only for you, or all users.

Then complete the installation with the default values.

Connection & first run

On the first start, we can select the connection type to our Azure Storage.

Then, we can login with our Azure account to access the storage.

The services available in our storage account depends on the configuration at creation time.

Access to local emulator

If we have configured the local emulator (Azurite), we can connect using the Open Connect Dialog icon.

And then the Attach to a local emulator option.

I have my Azurite instance configured with the default values, so I can connect just setting any Display name.

After confirmation, we can access our local Azurite in the same way that we can access our Azure storage (remember to run your local emulator).

Azure Storage emulator for development in Windows 10

I want to be able to run locally my back end apps that use Azure while I’m working on it.

In the past I used the Azure Storage Emulator but is no longer being supported, Azurite is the new version and in this post I will show you how to install it and start using it.

Install

There are several ways to install Azurite in your development machine like a Visual Studio Code extension, NPM or Docker, we are going to use Docker (If you don’t have it installed, check my post Installing Docker for Windows).

Open a powershell command prompt and use the following command to pull the latest Azurite docker image

docker pull mcr.microsoft.com/azure-storage/azurite

Run

Run Azurite with the following powershell commands

md c:\azurite

docker run -p 10000:10000 -p 10001:10001 -v c:/azurite:/data mcr.microsoft.com/azure-storage/azurite

Now Azurite is ready to be used and you can use your Azure Storage Explorer to access your data or develop your apps.

References

Azurite

Installing Docker for Windows 10

Docker Desktop for Windows is Docker for Windows 10, you can get the installer from here.

I started the installer, and continue using the default options.

After the installation is completed (reboot required), I needed to download and install the WSL 2 Linux Kernel and reboot again.

One of the advantages of using WSL is that we can now run Hyper-V (I use Hyper-V for android emulators) side by side with Linux containers, this was not possible before when Docker needed to use VirtualBox.

At this point Docker is installed and we can follow the provided tutorial.

To check that everything is working as expected, we can open a powershell window and execute the docker -v command.

Also in the context menu from the docker taskbar icon, we can switch to Windows Containers

And that is all! I hope this was useful and let me know what do you think in the comments!