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.
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 how to:
- Download the Installer
- Run the Installer
- Configure the IDE
- Deploy to Device
Download the Xamarin Installer
The 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.
Run the Xamarin Installer
Open the installer to begin the installation process:
When the installation is complete, close this window to exit the installer and begin working with Xamarin.
Configure 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.
Configure 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:
Configure Visual Studio
To configure the Visual Studio tools, navigate to Tools > Options > Xamarin > Android Settings:
As you begin developing, you will be asked to activate your installation. You will see a popover that looks like this:
If you've already purchased your Xamarin products, log in with your Xamarin credentials:
Upon successful activation, you can return to Xamarin or Visual Studio. The IDE will notify you that the activation has been completed, and how many machines are left on your subscription:
If you are running Starter Edition, you may see the activation popover with an added note saying that the project you are trying to compile is too large. At this point will need to either purchase a license or begin a trial if you want to build your project:
Use the second option to start a 30-day free trial of Xamarin Business Edition:
You can see how many days of the trial you have left at any point:
If you're ready to purchase, choose the first option to be redirected to the Xamarin store and checkout.
Create an Application
Now that we’ve installed the components, we can launch or IDE of choice and create a new solution.
For example, to create a new application in Visual Studio we would choose New Project... from the Visual Studio Welcome Screen and select Android > Android Application in the New Solution dialog. then, we'll an application name and click OK:
That’s it! Now we’re all set up to use Xamarin.Android to create Android applications!
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.
In the next tutorial, we’ll use Xamarin.Android to create our first Android application.