So right around I was trying to make me a new Xamarin.Forms application, somehow to following code runs fine in 1.0, until 1.2
...
SetPage (App.GetMainPage ());
In 1.2, the debugger reported that the SetPage was passing a null object, leading to the throwing of a NullReferenceException, then I was confused, I don't think that it will pass a null object, So I have make a null check for the Main Page:
var obj = App.GetMainPage ();
if (obj != null)
SetPage (obj);
Somehow the exception still exist, but this will run fine if I was using the original 1.0 version of Xamarin.Forms, now, I'm waiting for 1.2.2 version of Xamarin.Forms to see that if the error would likely scatter away.
↧
Null Reference Exception
↧