VISUAL STUDIO   Windows Mac

Using the Xamarin Android SDK Manager

Maintaining the Android SDK with the new Android SDK Manager

PDF for offline use
Related Articles:
Related Links:

Let us know how you feel about this

Translation Quality


0/250

last updated: 2017-05

Visual Studio includes an Android SDK Manager that replaces Google's standalone SDK Manager. This guide explains how to use the SDK Manager to download Android SDK tools, platforms, and other components that you need for developing Xamarin.Android apps.

Overview

Alpha or Beta Channel

ℹ️

Note: This guide applies to Visual Studio for Mac. Xamarin Studio is incompatible with the Xamarin Android SDK Manager.

The Xamarin Android SDK Manager helps you download the latest Android components that you need for developing your Xamarin.Android app. It replaces Google's standalone SDK Manager (which has been deprecated).

In version 25.2.3 of the Android SDK Tools package, Google introduced a new command line tool to maintain the Android SDK installed on a developer's workstation. This new tool, sdkmanager, is a command line utility that is found in $ANDROID_HOME/tools/bin/ and replaces the older android application that provided a standalone GUI manager for the Android SDK. Visual Studio for Mac and Xamarin for Visual Studio have both been updated with a standalone SDK manager which allows developers to maintain their Android SDK installation with the convenience of a GUI-based tool that is compatible with this change in the Android SDK tools.

Requirements

To use the Xamarin Android SDK Manager, you will need the following:

  • Visual Studio 2013, 2015, or 2017. Visual Studio Community edition and higher is supported.

  • Xamarin for Visual Studio version 4.5.0.443 or later. For information about updating Xamarin, see Change the Updates Channel.

  • The latest version of the Xamarin Android SDK Manager (available from the Visual Studio Gallery).

Please see the release notes for additional information about known issues with the SDK Manager.

If you are using an earlier version of the Android SDK that still supports the Google Android SDK Manager, you can install the Xamarin Android SDK Manager without creating a conflict – Visual Studio will use the Xamarin Android SDK Manager instead.

  • Visual Studio for Mac 7.0.0.3146 (or higher).

Please see the release notes for additional information about known issues with the SDK Manager.

SDK Manager

To start the SDK Manager in Visual Studio, click Tools > Android > Android SDK Manager:

Location of the Android SDK Manager menu item

To start the SDK Manager in Visual Studio for Mac, click Tools > SDK Manager:

Location of the Android SDK Manager menu item

The Android SDK Manager opens in a new window with three tabs, Platforms, Tools, and Locations:

Screenshot of the Android SDK Manager open in the Platforms tab

Screenshot of the Android SDK Manager open in the Platforms tab

Each of these tabs is described in the following sections.

Locations Tab

The Locations tab has three settings for configuring the locations of the Android SDK, Android NDK, and the Java SDK (JDK). These locations must be configured correctly before the Platforms and Tools tabs will function properly.

When the SDK Manager starts, it automatically determines the path for each installed package and indicates that it was Found by placing a green checkmark icon next to the path:

Screenshot of the Locations tab

In the above example, notice that the Android NDK was not found.

Missing packages are marked with a blank path, the words Not Found, and a red missing icon. To configure a path for a package that the SDK Manager could not locate (or to alter an existing path), click the … button next to the path:

Selecting a location Path in the Locations tab

This opens the Browse For Folder dialog to use for navigating to the location of the installed package. In this example, the Android NDK was added under Program Files (x86)\Android:

When you click OK, the SDK Manager adds this location path, marking the package as Found:

Location tab showing Android NDK package as found

Screenshot of the Locations tab

Click the Reset to Defaults button to cause the SDK Manager to look for the SDK, NDK, and JDK at their default locations.

Typically, you use the Locations tab to modify the location of the Android SDK and/or the Java JDK. You do not need to install the NDK to develop Xamarin.Android apps – the NDK is used only when you need to develop parts of your app using native-code languages such as C and C++.

Tools Tab

The Tools tab displays tools and extras. Use this tab to install the Android SDK tools, platform tools, and build tools. Also, you can install the Android Emulator, the low-level debugger (LLDB), the NDK, HAXM acceleration, and Google Play libraries.

For example, to install the Android Emulator, click the check mark next to Android Emulator and click the Apply Changes button:

Installing the Android Emulator from the Tools tab

Installing the Android Emulator from the Tools tab

A dialog may be shown with the message, Some components can be updated. Do you want to update them now? Click Yes. Next, a License acceptance dialog is shown:

License acceptance screen

License acceptance screen

Click Accept if you accept the Terms and Conditions. At the bottom of the window, a progress bar indicates download and installation progress. After the installation completes, the Tools tab will show that the Android Emulator is installed.

Platforms Tab

The Platforms tab displays a list of platform SDK versions along with other resources (like system images) for each platform.

Screenshot of the Platforms tab

Screenshot of the Platforms tab

This screen lists the Android version (such as "Android 7.0"), the code name ("Nougat"), the API level (such as 24), the status (Installed if the platform is installed). You use the Platforms tab to install components for the Android API level that you want to target (for more information Android versions and API levels, see Understanding Android API Levels).

If all components of a platform are installed, a checkmark appears next to the platform name. If not all components of a platform are installed, the box for that platform is filled.

You can expand a platform to see its components (and which components are installed) by clicking the + box to the left of the platform. Click - to unexpand the component listing for a platform.

You can expand a platform to see its components (and which components are installed) by clicking the arrow to the left of the platform. Click down arrow to unexpand the component listing for a platform.

To add another platform to the SDK, click the box next to the platform to install all of its components, then click Apply Changes:

Example of adding Android 7.1 Nougat components to the Android SDK

Example of adding Android 4.4 components to the Android SDK

To install only some components of a platform, unselect the components you don't want, or unselect the platform and select only the components that you need:

Example of adding some Android 7.1 components

Example of adding some Android 4.4 components

Notice that the number of components to install appears next to the Apply Changes button.

In the above example, eight components are ready to install.

After you click the Apply Changes button, you will see the License Acceptance screen:

Platform tab License Acceptance dialog

Platform tab License Acceptance dialog

Click Accept if you accept the Terms and Conditions. You may see this dialog more than one time when there are multiple components to install. At the bottom of the window, a progress bar will indicate download and installation progress. When the download and installation process completes (this can take many minutes, depending on how many components need to be downloaded), the added components are marked with a checkmark and listed as Installed.

Now you're ready to develop your app for that API level!

Summary

This guide discussed the Android SDK Manager GUI tool available in Visual Studio for Mac and Xamarin for Visual Studio.

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.