title: Xamarin Android.FormsAppCompatActivity NullReferenceException on Startup
body: <p>I stripped down my application as much as possible to find this problem. Still it appears:</p>
  
  <pre><code>11-12 15:56:27.908 I/MonoDroid(17629): System.NullReferenceException: Object reference not set to an instance of an object.
  11-12 15:56:27.908 I/MonoDroid(17629):   at Xamarin.Forms.Platform.Android.AppCompat.Platform.LayoutRootPage (Xamarin.Forms.Page page, System.Int32 width, System.Int32 height) [0x0005d] in C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:279 
  11-12 15:56:27.908 I/MonoDroid(17629):   at Xamarin.Forms.Platform.Android.AppCompat.Platform.Xamarin.Forms.Platform.Android.IPlatformLayout.OnLayout (System.Boolean changed, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x00003] in C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:196 
  11-12 15:56:27.908 I/MonoDroid(17629):   at Xamarin.Forms.Platform.Android.PlatformRenderer.OnLayout (System.Boolean changed, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x0000e] in C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\PlatformRenderer.cs:73 
  11-12 15:56:27.908 I/MonoDroid(17629):   at Android.Views.ViewGroup.n_OnLayout_ZIIII (System.IntPtr jnienv, System.IntPtr native__this, System.Boolean changed, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x00009] in /Users/builder/data/lanes/3511/ce955cc0/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.ViewGroup.cs:3427 
  11-12 15:56:27.908 I/MonoDroid(17629):   at (wrapper dynamic-method) System.Object:784a0fc1-dc7c-42ec-831f-0701fd382e8e (intptr,intptr,bool,int,int,int,int)
  11-12 15:56:27.925 W/art     (17629): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable
  </code></pre>
  
  <p>This is my Android Activity</p>
  
  <pre><code>[Activity(Label = "Bol",Icon = "@drawable/icon",MainLauncher = true,Theme = "@style/MyTheme.Splash", NoHistory = true)]
  public class MainActivity : FormsAppCompatActivity
  </code></pre>
  
  <p>For the splashscreen, I have the following values/styles.xml</p>
  
  <pre><code>&lt;resources&gt;
   &lt;style name="MyTheme.Splash" parent ="Theme.AppCompat.Light.NoActionBar"&gt;
    &lt;item name="android:windowBackground"&gt;@drawable/splash_screen&lt;/item&gt;
    &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt;
    &lt;item name="android:windowActionBar"&gt;false&lt;/item&gt;
    &lt;item name="android:windowFullscreen"&gt;true&lt;/item&gt;
    &lt;item name="android:actionBarSize"&gt;0dp&lt;/item&gt;
   &lt;/style&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>And the drawable/splash_screen.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  &lt;item&gt;
  &lt;color android:color="#000000"/&gt;
  &lt;/item&gt;
  &lt;item&gt;
  &lt;bitmap
      android:src="@drawable/icon"
      android:tileMode="disabled"
      android:gravity="center"/&gt;
  &lt;/item&gt;
  &lt;/layer-list&gt;
  </code></pre>
  
  <p>And the Xamarin (Prism) Application</p>
  
  <pre><code>public class App : PrismApplication
  {
      public App(IPlatformInitializer initializer = null) : base(initializer) { }
  
      protected override void OnInitialized()
      {
          Logger = Container.Resolve(typeof(ILogger), null, new CompositeResolverOverride()) as ILoggerFacade;
          var navigationPage = "NavigationPage/MainMenu";
          NavigationService.NavigateAsync(navigationPage);
      }
  }
  </code></pre>
  
  <p>The MainMenu is just an empty ContentPage. </p>
  
  <p>I don't see any hint about what leeds to the NullReference during Xamarin.Forms.Platform.Android.AppCompat.Platform.LayoutRootPage</p>