Xamarin.Forms null reference exception when applying Material Theme
<p>Following the <a href="https://blog.xamarin.com/material-design-for-your-xamarin-forms-android-apps/" rel="nofollow noreferrer">Material Design for Your Xamarin.Forms Android Apps</a> tutorial on the Xamarin website, my project is recognising the existence of my style.xml and applying it to the starting "splash screen" of the application:
<a href="https://i.stack.imgur.com/XcHGD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XcHGD.png" alt=""></a></p>

<p>However as soon as the application loads my MainPage I am given a null reference exception by Visual Studio with no other details besides it occurring in the instantiation of my application. When removing references to the theme, the application does start and runs as expected. I am only using the example style.xml and color.xml files as included in the tutorial and removing the actual styling from the theme still crashes the application.</p>

<p>style.xml</p>

<pre><code>&lt;resources&gt;
&lt;style name="MyTheme" parent="MyTheme.Base"&gt;&lt;/style&gt;
  &lt;style name="MyTheme.Base" parent="Theme.AppCompat.Light"&gt;
    &lt;item name="colorPrimary"&gt;@color/primary&lt;/item&gt;
    &lt;item name="colorPrimaryDark"&gt;@color/primaryDark&lt;/item&gt;
    &lt;item name="colorAccent"&gt;@color/accent&lt;/item&gt;
    &lt;item name="android:windowBackground"&gt;@color/window_background&lt;/item&gt;
    &lt;item name="windowActionModeOverlay"&gt;true&lt;/item&gt;
  &lt;/style&gt;
&lt;/resources&gt;
</code></pre>

<p>colors.xml</p>

<pre><code>&lt;resources&gt;
  &lt;color name="primary"&gt; #1976D2&lt;/color&gt;
  &lt;color name="primaryDark"&gt; #FFC107&lt;/color&gt;
  &lt;color name="accent"&gt;#F5F5F5&lt;/color&gt;
  &lt;color name="window_background"&gt;#2196F3&lt;/color&gt;
&lt;/resources&gt;
</code></pre>

<p>MainActivity.cs</p>

<pre><code>using System;

using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;

namespace Ripper_Quotes_Forms.Droid
{
    [Activity (Label = "Ripper Quotes", Icon = "@android:color/transparent",  Theme="@style/MyTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
    public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity
    {
        protected override void OnCreate (Bundle bundle)
        {
            base.OnCreate (bundle);

            global::Xamarin.Forms.Forms.Init (this, bundle);
            LoadApplication (new Ripper_Quotes_Forms.App ());
        }
    }
}
</code></pre>

<p>MainPage.xaml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:Ripper_Quotes_Forms"
             x:Class="Ripper_Quotes_Forms.MainPage"
             Title="Ripper Quotes"&gt;
  &lt;ContentPage.Content&gt;
    &lt;Grid&gt;
    &lt;Grid.RowDefinitions&gt;
      &lt;RowDefinition Height="*"/&gt;
    &lt;/Grid.RowDefinitions&gt;
      &lt;ListView x:Name="QuoteList" Grid.Row="0"&gt;
        &lt;ListView.ItemTemplate&gt;
          &lt;DataTemplate&gt;
            &lt;local:QuoteViewCell/&gt;
          &lt;/DataTemplate&gt;
        &lt;/ListView.ItemTemplate&gt;
      &lt;/ListView&gt;
    &lt;/Grid&gt;
  &lt;/ContentPage.Content&gt;
&lt;/ContentPage&gt;
</code></pre>

<p>MainPage.xaml.cs</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using RipperQuotes;

namespace Ripper_Quotes_Forms
{
    public partial class MainPage : ContentPage
    {
        private RipperCon _con = new RipperCon();
        public MainPage()
        {
            InitializeComponent();
            QuoteList.HasUnevenRows = true;
            NavigationPage.SetTitleIcon(this, "");

            ToolbarItems.Add(new ToolbarItem("New", "", async () =&gt;
                await Navigation.PushModalAsync(new NewQuotePage())
                ));
            ToolbarItems.Add(new ToolbarItem("More", "", async () =&gt;
                await DisplayActionSheet("More", "Back", "", new string[] { "View Categories" })
            ));
        }
        protected async override void OnAppearing()
        {
            base.OnAppearing();
            await _con.DownloadJson();
            QuoteList.ItemsSource = _con.Quotes;
        }
    }
}
</code></pre>