Hi friends.
I just have updated to Xamarin Forms 2, but when in my SplashActivity, the method StartActivity() is executed I am getting this error:
Here is the code of my SplashActivity:
[Activity(MainLauncher = true, NoHistory = true, Label = "VisionMobile", Theme = "@style/Theme.Splash", Icon = "@drawable/icon",
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation, ScreenOrientation = ScreenOrientation.Portrait)]
public class SplashActivity : Activity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
Thread.Sleep(1000);
StartActivity(typeof(MainActivity));
}
}
And the code of the MainActivity:
[Activity(Icon = "@drawable/icon", Theme = "@android:style/Theme.Holo.Light",
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation, ScreenOrientation = ScreenOrientation.Portrait)]
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 App());
}
}
Some idea about what it is happening?