You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The old method of setting up a view presenter in Setup.cs (Android) was to use something like:
protected override IMvxAndroidViewPresenter CreateViewPresenter()
{
var presenter = new MvxFormsDroidPagePresenter();
Mvx.RegisterSingleton<IMvxViewPresenter>(presenter);
return presenter;
}
This unfortunately overrides the view presenter, and means that here in MvxFormsAppCompatActivity.cs won't resolve properly.
In turn this means that:
base.OnCreate(bundle); in your MainActivity when overriding MvxFormsAppCompatActivity will throw an NullReferenceException saying that "application is null`.
This had me banging my head against a wall for quite a long time, but I managed to work it out by looking at the new implementation in MvxFormsAndroidSetup.
I noticed that CreateFormsApplication was not being called - it might not be immediately obvious to other users updating from older MvvmCross versions!
Configuration
Version: 5.1.1
Platform:
iOS
Android
WPF
UWP
The text was updated successfully, but these errors were encountered:
Steps to reproduce
The old method of setting up a view presenter in Setup.cs (Android) was to use something like:
This unfortunately overrides the view presenter, and means that here in MvxFormsAppCompatActivity.cs won't resolve properly.
In turn this means that:
base.OnCreate(bundle);
in yourMainActivity
when overridingMvxFormsAppCompatActivity
will throw an NullReferenceException saying that "application is null`.This had me banging my head against a wall for quite a long time, but I managed to work it out by looking at the new implementation in MvxFormsAndroidSetup.
I noticed that
CreateFormsApplication
was not being called - it might not be immediately obvious to other users updating from older MvvmCross versions!Configuration
Version: 5.1.1
Platform:
The text was updated successfully, but these errors were encountered: