Some time ago I wrote a post on how to install Xamarin.Android in Linux. At the time I was using Kde Neon which was based upon Ubuntu 18.04. Recently I tried to follow the same instructions to set up Project Rider for Android development on Ubuntu 19.04. Pretty much everything went smoothly, except for a couple of issues. For anyone interested, follow the previous instructions and apply the differences listed below.
INSTALL ORACLE JDK
You currently need to use Oracle Java 8 to build Xamarin Android projects in Project Rider. This isn’t available in any repositories that I know of, so I downloaded and unzipped this project from github, then I downloaded the Oracle Java 8u212 SDK from here into the same unzipped folder I had just created. I then executed the following command to install it:
yes | sudo ./install-java.sh -f jdk-8u212-linux-x64.tar.gz
The official Xamarin for Linux builds have been failing for over a month. For this install I used build 2194, which was the last successful build, you can find artifacts for the last successful build here. The file I downloaded was:
Project Rider could not find libzip.so.4 The solution was:
sudo apt-get install libzip-dev
sudo ln -s libzip.so.5.0 libzip.so.4
As per the previous instructions, download the nuget package, unzip it, and then copy the file System.Reflection.Metadata.dll from the lib/netstandard2.0 folder over the file found in /usr/lib/mono/msbuild/15.0/bin/
If you create a new project, and get an error that a string resource can’t be found, rename the file Strings.xml in the file system to strings.xml.
Overall the installation went well.
I must say Project Rider is coming on in leaps and bounds, many of the features of Android Studio are starting to find their way into the IDE such as tools:
And a working designer!