Installing for Android
Installation for Windows
Installing Mono for Android on Windows
Brief
This article walks through the installation steps and configuration details required to install Mono for Android. By the end of this article, we will have a working Mono for Android installation integrated into MonoDevelop and/or Microsoft Visual Studio, and we’ll be ready to start building our first Mono for Android application.Overview
- Downloading the Installer
- Running the Installer
- Configuring our IDE
- Configuring any Additional Emulators
Downloading the Mono for Android Installer
Your first step is to download the Mono for Android Windows installer, which can be found at http://android.xamarin.com/DownloadTrial:
If you’ve purchased Mono for Android, follow the download instructions in the e-mail you received with your purchase.
Running the Mono for Android Installer
To run the installer, simply double-click it. Also, on Windows it needs to be run with admin rights.
This is the first screen in the installation process. If you’re behind a proxy, configure network proxy settings by using the Click here to configure link near the bottom of this dialog:
Step 1 - Identify the required components
The first step required by the installer is to inspect the system to determine which, if any, required components are missing and need to be downloaded and installed:Step 2 - Installing the Components
After identifying missing components, the Mono for Android installer downloads and executes the installers for the platform dependencies, as shown in this dialog:
During this part of the installation, you may
be prompted to accept license agreements and/or to elevate the
permissions necessary for individual components that are needed to
complete installation, for example:
Step 3 - Completing the Installation
Once we’ve reached this step, we’re almost ready to begin developing a Mono for Android application. Select
Close
and continue on to the final step:Step 4 - Configuring the Installation
Now that we’ve installed the components, we
need to tell our IDE where to find them. MonoDevelop 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 MonoDevelop
To configure SDK locations in MonoDevelop, navigate to
Tools > Options
in the Application menu bar, then select Other > SDK Locations
from the left tree-view panel in the Options dialog: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 Mono for 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 MonoDevelop (if we’re using it).
Launching the AVD Manager from MonoDevelop
If we’re using MonoDevelop 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 clickingNew…
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 Mono for Android to create Android applications!
Comments
Post a Comment