Frequently Asked Questions

PDF for offline use

Let us know how you feel about this

Translation Quality


0/250

last updated: 2017-06

Installation & Setup

Which Android SDK packages should I install?

Installing the Android SDK doesn't automatically include all the minimum required packages for developing. While individual developer needs vary, this guide discusses the packages that will generally be required for developing with Xamarin.Android.

Where can I set my Android SDK locations?

This guide describes both the default settings of the Android SDK, which should work for most setups; and how to change these defaults in Visual Studio for Mac or Visual Studio if needed.

How do I update the Java Development Kit (JDK) version?

This article illustrates how to update the Java Development Kit (JDK) version on Windows and Mac.

How can I manually install the Android Support libraries required by the Xamarin.Android.Support packages?

This guide provides example steps for installing the Xamarin.Android.Support.v4 support library on Windows & Mac.

How do I install Google Play Services in an emulator?

This guide links to information on installing Google Play Services in Visual Studio's Android emulator.

What USB drivers do I need to debug Android on Windows?

To debug on an Android device when developing in Windows; you need to install a compatible USB driver. The Android SDK Manager includes the "Google USB Driver" by default, which adds support for Nexus devices. Other devices require USB drivers specifically published by the device manufacturer. This guide provides information on finding these drivers as well as alternative testing methods.

Is it possible to connect to Android emulators running on a Mac from a Windows VM?

This guide covers methods when using a Google Android emulator or Genymotion.

General Questions

How do I automate an Android NUnit Test project?

This guide covers steps for setting up an Android NUnit test project, not a Xamarin.UITest project. Xamarin.UITest guides can be found here.

How do I enable Intellisense in Android .axml files?

This guide describes how to activate Visual Studio's Intellisense for Android .axml files.

Why can't my Android release build connect to the Internet?

The most common cause of this issue is that the INTERNET permission is automatically included in a debug build, but must be set manually for a release build. This guide describes how to enable the permission on release builds.

Smarter Xamarin Android Support v4 / v13 NuGet Packages

Support-v4 and Support-v13 can not be used together in the same app, that is, they are mutually exclusive. This is because Support-v13 actually contains all of the types and implementation of Support-v4. If you try and reference both in the same project you will encounter duplicate type errors.

Deprecated

ℹ️

Note: The articles below apply to issues that have been resolved in recent versions of Xamarin. However, if the issue occurs on the latest version of the software, please file a new bug with your full versioning information and full build log output.

What version of Xamarin.Android added Lollipop support?

This guide was originally written for the Android L preview.Xamarin.Android 4.17 added Android L Preview Support & Xamarin.Android 4.20 added Android Lollipop Support.

Android.Support.v7.AppCompat - No resource found that matches the given name: attr 'android:actionModeShareDrawable'

This error may occur in older versions of Xamarin if some of the required Android SDK pacakages are missing.

Adjusting Java memory parameters for the Android designer

The default memory parameters that are used when starting the java process for the Android designer might be incompatible with some system configurations. Starting with Xamarin Studio 5.7.2.7 and Xamarin for Visual Studio 3.9.344 these settings can be customized on a per-project basis.

My Android Resource.designer.cs file will not update

A bug in Xamarin.Studio 5.1 previously corrupted .csproj files by partially or completely deleting the xml code in the .csproj file. This would cause important parts of the Android build system (such as updating the Android Resource.designer.cs) to fail. As of the 5.1.4 stable release on July 15th, this bug has been fixed; but in many cases the project file has to be repaired manually, as described in this guide.

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.