Mac

From $1
    Table of contents

    Installing Mono for Android for Mac involves six steps:

    1. Install the Java SDK
    2. Install the Android SDK
    3. Install Mono for Mac
    4. Install MonoDevelop for Mac
    5. Install Mono for Android for Mac
    6. Update the Mono for Android MonoDevelop Add-in
    7. Configuring the Add-in
    8. Configure your Emulator

    If you are upgrading from the first preview of the addin, you may skip a few steps:

    1. Update MonoDevelop for Mac
    2. Update Mono for Android for Mac
    3. Update the Mono for Android MonoDevelop addin

    Install the Java SDK

    Mac OS X 10.6 (Snow Leopard) already contains the Java SDK. Nothing needs to be done on Mac OS X 10.6.

    Mac OS X 10.7 (Lion) does not contain the Java SDK. To install the Java SDK on Mac OS X Lion:

    1. Open the Applications > Utilities folder (within Finder, press Shift+Command+U).
    2. Open the Java Preferences utility.
    3. If Java is not installed, you will see a dialog box stating To open "Java Preferences", you need to install a Java Runtime. Would you like to install one now?
      InstallJavaPrompt.png

    4. Press the Install button.

    Install the Android SDK

    Download the Android SDK from Google:

    • Download Mac SDK zip (e.g. android-sdk_r08-mac_86.zip) from: http://developer.android.com/sdk/index.html
    • Extract the installer to some location such as /opt/android/sdk.
    • Run the SDK Manager (tools/android) after install. If prompted to install the Java runtime, click the Install button.
      InstallJavaPrompt2.png
    • Install at least:
      • Android SDK Tools, revision 10 or greater
      • Android SDK Platform-tools, revision 3 or greater
    • Install one or more SDK Platforms, such as:
      • SDK Platform Android 1.6, API 4, revision 3
      • SDK Platform Android 2.2, API 8, revision 2

    Install Mono for Mac

    Download and install the Mono framework for Intel Mac from Mono download page

    You must have Mono 2.10.1 or later. If you have an older version, please upgrade it.

    Install MonoDevelop for Mac

    Mono for Android currently requires a beta version of MonoDevelop for 2.6, you can get it from the MonoDevelop Download page.  

    MonoDevelop 2.6 betas can be installed be installed side-by-side with MonoDevelop 2.4.x on Mac.  We recommend continuing to use MonoDevelop 2.4.x for MonoTouch and MonoMac development.

    Install Mono for Android for Mac

    Download and install the Mono for Android SDK pkg from http://mono-android.net/DownloadTrial

    Update the Mono for Android MonoDevelop Add-in

    Open MonoDevelop, then click MonoDevelop > Add-in Manager....

    Add-in Manager.png

    In the Installed tab, expand the Mobile Development tree and select Mono for Android development.

    Add-in Manager Installed Tab.png

    Click the Update button, if available, then click the Install button. You need at least version 2.6.5.2 of the add-in.

    Once the add-in has been installed, restart MonoDevelop.

    Configuring the Addin

    After installing the addin, you will have to tell it where you have installed the Android SDK.

    Open the MonoDevelop->Preferences dialog, go to the Other category, and select the Mono for Android SDKs option panel, and specify the Android SDK location:

    MfA Preferences.png

    Configure Your Emulator

    The Android Emulator can be run in a variety of configuration to emulate different devices. If you have a real device, you may find it to be substantially faster to develop with it instead of using the emulator. If not, you will need to configure at least one emulator to get started.  

    You do this by selecting the "Virtual Devices" option from the Android SDK installer:

    mac_android_manager_emulator_new.png

    Select "New" in this dialog box, and then configure your device.   This is a good starting configuration:

    mac_android_manager_emulator_settings.png

    Do not be scared by the following message, this is Android's SDK way of telling you that everything is OK, and everything will be alright:

    mac_android_manager_emulator_created.png

    Once you do this, you are done configuring the emulator. There is nothing left to do in the Android SDK Setup application.

    Note: You should not start the emulator from the Android SDK Setup application.  Mono for Android will handle this for you.

    Tag page
    • No tags
    Page last modified 15:30, 5 Aug 2011 by jonp