Forum Xamarin.Android

savedInstanceState null when Adding a widget to a existing App

MulflarMulflar ESUniversity ✭✭
edited August 2016 in Xamarin.Android

I have and existing android app, It works perfect.

I decided to create a widget for my app, and I followed
Xamarin Widget Sample, and Vogela Widget tutorial guidelines to add what it's needed.

Unfortunately since them the app crashes on start with this exception

Java.Lang.NullPointerException: Attempt to invoke virtual method 'void' on a null object reference

The problem comes because when loading the first activity and doing base.OnCreate (savedInstanceState); Bundle savedInstanceState is null.


  • MulflarMulflar ESUniversity ✭✭
    edited August 2016

    I finally found the error by myself. It seems the xml folder gives some errors on xamarin android. I just moved the content to layout and reference it as layout/ instead of /xml

  • Thanks for the Solution.Appreciate it..

Sign In or Register to comment.