How to develop Xamarin.Android applications on Linux with Rider

Please note that Xamarin.Android on Linux is officially unsupported. However, it is possible to manually install Xamarin.Android and configure Rider so that it can build and run Xamarin.Android apps on Linux. This guide has been tested on Ubuntu 16.04.

Install the latest stable Mono


sudo apt-key adv –keyserver hkp:// –recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb xenial main" | sudo tee /etc/apt/sources.list.d/mono-official.list
sudo apt-get update
sudo apt-get install mono-devel

Install JDK

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer (or sudo apt-get install oracle-java9-installer)
sudo apt-get install default-jdk

Install Android Studio

Download Android Studio
Install Android Studio
Download appropriate Android SDK and NDK

Install Xamarin.Android

Download any stable build:

Choose any oss-xamarin.android_vVERSION_Linux-x86_64_HEAD*.tar.bz2 artifact from

Extract it:

tar xjf ./oss-xamarin.android_v{VERSION}_Linux-x86_64_HEAD{*}.tar.bz2

Goto the unpacked dir:

cd ./oss-xamarin.android_v{VERSION}_Linux-x86_64_HEAD{*}

Make dirs:

sudo mkdir "/usr/lib/"
sudo mkdir "/usr/lib/mono/xbuild/Xamarin/"

Copy dir form extracted files:

sudo cp -a "bin/Debug/lib/" "/usr/lib/"

Delete dirs for next steps:

rm -rf "/usr/lib/mono/xbuild/Xamarin/Android"
rm -rf "/usr/lib/mono/xbuild-frameworks/MonoAndroid"

Make Symlinks:

sudo ln -s "/usr/lib/" "/usr/lib/mono/xbuild/Xamarin/Android"
sudo ln -s "/usr/lib/" "/usr/lib/mono/xbuild-frameworks/MonoAndroid"

Add the next lines to your csproj file:

<PropertyGroup Condition=" '$(OS)' == 'Unix' ">

Make sure that ANDROID_SDK_PATH and ANDROID_NDK_PATH environment variables are set.

Configure SDK and NDK paths in Rider settings

Go to "File | Settings | Build, Execution, Deployment | Xamarin" and set "Android SDK location" and "Android NDK location".

You should now be able to build and run Xamarin.Android applications on Linux with Rider.




Add the following line in your *.csproj File for your Android Project inside the PropertyGroup

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">




It seems that the default "AndroidSupportedAbis" are different than under Visual Studio for MacOS. There I could change the supported ABIs and the new <AndroidSupportedAbis> was created.

I hope that fixes your problem.

I didn't needed the <PropertyGroup Condition=" '$(OS)' == 'Unix' " /> Section.

It's broken anyway because the MonoAndroidToolsDirectory and MonoAndroidBinDirectory directories don't exist.


I face the problem that I cannot launch the Android Project from the context Menu of the Project in the Solution View:

Cannot run project of type XamarinAndroid with a .NET Project run configuration. You can run this project using one of the following configuration types: Xamarin.Android.

Running it from the Toolbar with the correct Run/Debug configuration works though.

Edited by Andreas Go

Thanks to the excellent support at JetBrains and Andreas Go's help, I'm now up and running.

For anyone interested, I've made a blog post based on the above instructions:

Thanks JetBrains!

Edited by David

link to Jenkins mono do not work! What I must do? Is your rider usable or VS better



SDK and NDK location settings on Linux are not always saved correctly, which is a bug. Please try to save them again via Enter, restart Rider, and check the settings again to make sure they have been applied.


Just can't get this working in Ubuntu 18.04 - It builds fine, but deployment is problematic. I can't launch the x86_64 system image (api 28) with emulator64_x86 - it complains it can't find the kernel, the specific error is:

[Please ensure the file "kernel-qemu" is in the same location as your system image]

I can launch the x86_64 image with emulator, but then the adb deployment command fails saying:

['INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]

I'm guessing that is because the Xamarin build files downloaded from Jenkins are x86_64 not x86?

If I'm not mistaken, the problem is the inability to launch the x86_64 system image using emulator64_x86?


Thanks for the heads up Gvitaha, just checked it out it seems the CI service is temporarily down, should be up soon - see here (Monday they say):


I followed this, created a new Xamarin.Android project but am getting this error at build time. I have the Android_SDK_Path set correctly. An y guidance? 


Also the SDK is set here. I appreciate the help :) 

Edited by Michael

Please sign in to leave a comment.

Have more questions?

Submit a request