Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MvxIoCResolveException Exception when back button clicked #2984

Closed
NPadrutt opened this issue Jun 27, 2018 · 5 comments
Closed

MvxIoCResolveException Exception when back button clicked #2984

NPadrutt opened this issue Jun 27, 2018 · 5 comments
Milestone

Comments

@NPadrutt
Copy link

Since I upgraded my Xamarin Forms app to MvvmCross v6.1.2 I get always this exception on Android when I click on the back button of the device. The Button of the navigation bar works fine. Forward navigation is fine as well.

MvvmCross.Exceptions.MvxIoCResolveException: Failed to resolve type MvvmCross.Forms.Presenters.IMvxFormsPagePresenter

In this branch the error occurs: https://github.com/NPadrutt/MoneyFox.Windows/tree/mvvmcrossBackButtonIssue

@Goncharuk-Nikita
Copy link

Goncharuk-Nikita commented Jun 28, 2018

Yea, i also get these exception. I work with MvxMasterDetailPage

@MartinZikmund
Copy link
Contributor

This fails because IMvxFormsPagePresenter is not registered in the default setup. In the meantime you can use a workaround - register the IMvxFormsPagePresenter that is created manually in your Android Setup class:

protected override IMvxFormsPagePresenter CreateFormsPagePresenter(IMvxFormsViewPresenter viewPresenter)
{
    var formsPresenter = base.CreateFormsPagePresenter(viewPresenter);
    Mvx.RegisterSingleton(formsPresenter);
    return formsPresenter;
}

@NPadrutt
Copy link
Author

NPadrutt commented Jul 1, 2018

Thanks @MartinZikmund. The workaround works.

@nmilcoff
Copy link
Contributor

nmilcoff commented Jul 4, 2018

Hey @nickrandolph, am I right if I say this was solved in #2972?

@nickrandolph
Copy link
Contributor

Yes I do believe so. Let's wait to see the next release and then close once verified

@martijn00 martijn00 added this to the 6.2.0 milestone Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

6 participants