Cross Platform
Android
iOS
Mac
 

Windows

Installing Xamarin.Android on Windows

This article walks through the installation steps and configuration details required to install Xamarin.Android. By the end of this article, we will have a working Xamarin.Android installation integrated into Xamarin Studio and/or Microsoft Visual Studio, and we’ll be ready to start building our first Xamarin.Android application.

Overview

The Xamarin.Android installer will automatically detect, download, and install any components required for completing the installation. This tutorial examines the installation and configuration steps required to install the Xamarin platform and to get our development environment set up, including:

  • Downloading the Installer
  • Running the Installer
  • Configuring our IDE
  • Configuring any Additional Emulators

Downloading the Xamarin Installer

Your first step is to download the Xamarin unified installer, which can be found at http://www.xamarin.com/Download:

If you’ve purchased Xamarin.Android, follow the download instructions in the e-mail you received with your purchase.

Running the Xamarin Installer

The installer steps are as follows:

  1. Begin the installation process:

  2. Continue (optionally configure proxy settings using the link at the bottom of this screen):

  3. Choose which features to install (ensure that Xamarin.iOS is ticked):

  4. Agree to the Android installation location (if you are also installing Xamarin.Android):

  5. Review the list of products to be downloaded and installed.

  6. Tick the box to accept the license agreement.

  7. The status bar shows installation progress. Progress for each product will be displayed.

  8. Once installation is complete, you’ll see another progress window while Windows is configured.

  9. Once the installation is done, Visual Studio is started automatically in the background so you can start building applications right away.

Close this window to exit the installer and begin working with Xamarin.

Configuring the Installation

Now that we’ve installed the components, we need to tell our IDE where to find them. Xamarin Studio and Visual Studio both have configuration options that let us specify the Java and Android SDK locations.

During installation, the installer places the installed components in their default locations and configures the development environment with the appropriate path configuration. However, if we already had them installed or if we installed them in locations other than the default, then we must explicitly specify the paths to these components.

Configuring Xamarin Studio

To configure SDK locations in Xamarin Studio, go to Xamarin Studio Preferences, then select Build > SDK Locations > Android from the left tree-view panel in the dialog:

Configuring Visual Studio

To configure the Visual Studio tools, navigate to Tools -> Options -> Xamarin -> Android Settings:

Configuring Additional Android Emulators

You can run the Android Simulator in a variety of configurations to simulate different devices. Each one of these configurations is created as a Virtual Device. By default, the Xamarin.Android installer will create a virtual device for each of the Android platforms registered by the installer. However, we can create our own custom virtual device configuration.

Virtual devices are configured via the Android Virtual Device (AVD) Manager. The AVD Manager can either be launched from the Android SDK Manager, or directly from Xamarin Studio (if we’re using it).

Launching the AVD Manager from Xamarin Studio

If we’re using Xamarin Studio and have an open project, the AVD Manager can be launched directly by selecting Tools > Managed AVDs from the menu bar:

Launching the AVD Manager from the Android SDK Manager

We can launch the Android SDK Manager from the Start menu like this:

Once we have located and opened the Android SDK Manager, we can launch the AVD Manager by navigating to the top menu bar and then selecting Tools > Manage AVDs...

Creating a new Virtual Device

Once the AVD Manager is open, we can create a new virtual device by clicking New...

This should open the Create new Android Virtual Device dialog and allow us to configure our device by using this dialog:

Once we’re finished configuring the device, we can select Create AVD. We can then see that the device was created successfully with the hardware configuration options we specified by checking the dialog shown below:

That’s it! Now we’re all set up to use Xamarin.Android to create Android applications!

Summary

In this article, we examined how to set up and install the Xamarin.Android platform on Windows. We also looked at some different ways to configure our platform installation in Xamarin Studio and in Visual Studio. And we showed you how to use the Android Virtual Device Manager to define your Android SDK Emulator configurations.

In the next tutorial, we’ll use Xamarin.Android to create our first Android application.