Detailed instructions on setting up Xamarin.Android on Linux!
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Setting up Xamarin.Android on Linux

A guide to getting Xamarin.Android ready to use on your distro of choice!

This guide has been tested successfully:

  • Arch Linux as of Feb 3, 2018
  • Ubuntu 16.04 (mono-5.8) as of Feb 23, 2018

Note that this is officially unsupported, but it can be used as a loose guide to help in setting this up on your system.

works badge


Xamarin has stated that there are no plans to officially support Linux. However, since Xamarin was open sourced, the developers have made it possible to manually install Xamarin.Android, and with some tweaking we can get full debugging support in Rider!

Let's start


  • Latest mono packages for your platform

Obtain Xamarin.Android binaries

Prebuilt Releases (Recommended)

The latest successful artifacts from automated builds for Linux are available here:

Download the*.orig.tar.bz2 package to your system and extract it.

From source

See their instructions on building from source.

Environment setup

Install the Android SDK and NDK, then set environment variables:

(You may have to adjust the paths; these are the default for Android Studio)

export ANDROID_SDK_PATH=$HOME/Android/Sdk
export ANDROID_NDK_PATH=$HOME/Android/Sdk/ndk-bundle

Test build

Build a test project (there's one in the source repository) for Xamarin.Android.

/path/to/*/bin/Debug/bin/xabuild /path/to/samples/HelloWorld/HelloWorld.csproj

The build should complete successfully. If you have problems, try adding /verbosity:d to get detailed output from the build process. You may have a minor error about not being found, just create a symlink to your libzip:

sudo ln -s /usr/lib/ /usr/lib/

Next, try building a signed package:

/path/to/*/bin/Debug/bin/xabuild /path/to/samples/HelloWorld/HelloWorld.csproj /t:SignAndroidPackage

This will invoke keytool and generate a keystore and use it to sign an .apk file, which will go to your output directory with a name like YourTestProject-Signed.apk.

Bonus: IDE (especially JetBrains Rider) support

This will enable building Xamarin.Android projects directly from msbuild.

Please refer to