Table of contentsInstalling Mono for Android on OSXBriefThis 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 we’ll be ready to start building our first Mono for Android application. OverviewThe Mono for 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 Mono for Android platform and to get our development environment set up, including:
Downloading the Mono for Android InstallerYour first step is to download the Mono for Android Mac OSX installer, which can be found at http://android.xamarin.com/DownloadTrialXamarin: 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 InstallerTo run the installer, double-click the dmg to mount it. Then, simply double-click it the installer. Step 1 – Identifying the required componentsThe 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 – Accept the LicenseBefore the installation can continue, you need to accept the license agreement.
Step 3 – Installing the ComponentsAfter 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 elevate the permissions necessary for individual components that are needed to complete installation. Step 4 – Completing the InstallationOnce we’ve reached this step, we’re ready to begin developing a Mono for Android application. Select Launch MonoDevelop and continue on to the final step: Step 5 – Creating an ApplicationNow that we’ve installed the components, we can launch MonoDevelop and create a new solution. Select Start New Solution from the MonoDevelop Welcome Screen and select Mono for Android > Mono for Android Application in the New Solution dialog. Enter an application name and click OK. Once the Mono for Android solution is loaded in MonoDevelop, we can run the application in one of the emulators that Mono for Android pre-creates during installation, shown below in the Android Virtual Device Manager. We’ll discuss how to use the Android Virtual Device Manager to create additional emulators in the next section. Configuring Additional Android EmulatorsYou can run the Android emulator 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 MonoDevelopIn MonoDevelop, the AVD Manager can be launched directly by selecting Tools > Open AVD Manager from the menu bar:
Creating a new Virtual DeviceOnce 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 Mono for Android to create Android applications! SummaryIn this article, we examined how to set up and install the Mono for Android platform on Mac. We also looked at some different ways to configure our platform installation in MonoDevelop 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 Mono for Android to create our first Android application. |