Note that there are some explanatory texts on larger screens.

plurals
  1. POmvvmcross navigation issue, getting exception: Could not find view for [ViewModelName]
    primarykey
    data
    text
    <p>I seem to be confused at how to make MvvmCross detect my ViewModels that are associated with views in Mono for Android. I tried to follow TwitterSearch in implementing the navigation but it just won't work.</p> <pre><code>RequestNavigate&lt;LoginViewModel&gt;(); </code></pre> <p>here's my view:</p> <pre><code>[Activity(Label = "Login")] public class LoginActivity : MvxBindingActivityView&lt;LoginViewModel&gt; { protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); App.InitializeRestConnection(this); } protected override void OnViewModelSet() { SetContentView(Resource.Layout.LoginBindable); } } </code></pre> <p>here's the exception:</p> <pre><code>I/ActivityManager( 307): Displayed com.desco.pendulum/pendulum.androidapp.SplashScreenActivity: +1s373ms (total +4s420ms) I/Navigation( 8643): 0.50 Navigate to LoginViewModel with args I/mono-stdout( 8643): Navigation:Diagnostic: 0.50 Navigate to LoginViewModel with args I/MonoDroid( 8643): UNHANDLED EXCEPTION: System.Collections.Generic.KeyNotFoundException: Could not find view for dESCO.Mobile.ViewModels.LoginViewModel I/MonoDroid( 8643): at Cirrious.MvvmCross.Views.MvxViewsContainer.GetViewType (System.Type) &lt;0x001a4&gt; I/MonoDroid( 8643): at Cirrious.MvvmCross.Droid.Views.MvxAndroidViewsContainer.GetIntentFor (Cirrious.MvvmCross.Views.MvxShowViewModelRequest) &lt;0x00023&gt; I/MonoDroid( 8643): at Cirrious.MvvmCross.Droid.Views.MvxAndroidViewPresenter.Show (Cirrious.MvvmCross.Views.MvxShowViewModelRequest) &lt;0x00037&gt; I/MonoDroid( 8643): at Cirrious.MvvmCross.Droid.Views.MvxAndroidViewDispatcher/&lt;&gt;c__DisplayClass1.&lt;RequestNavigate&gt;b__0 () &lt;0x0002f&gt; I/MonoDroid( 8643): at Java.Lang.Thread/RunnableImplementor.Run () &lt;0x0003f&gt; I/MonoDroid( 8643): at Java.Lang.IRunnableInvoker.n_Run (intptr,intptr) &lt;0x00037&gt; I/MonoDroid( 8643): at (wrapper dynamic-method) object.7060b187-418d-4bca-ad4f-8b9cae936501 (intptr,intptr) &lt;0x0003b&gt; </code></pre> <p>any suggestions?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload