Closed ghost closed 8 years ago
So what happens if you don't cast it to MvxAutoCompleteTextView
?
indicates it cannot do a implicit cast hence will not build.
Error CS0266: Cannot implicitly convert type Android.Views.View' to
MvvmCross.Binding.Droid.Views.MvxAutoCompleteTextView'. An explicit conversion exists (are you missing a cast?) (CS0266)
What namespace are you using in your AXML file? Seems like you are using MvxAutoCompleteTextView from one library in your AXML and trying to cast it to something else. Check your types and namespaces.
Isn't this related to https://github.com/MvvmCross/MvvmCross-AndroidSupport/issues/257 ?
It does not seem like it is related. I looks like a casting exception because wrong namespaces are used. However, it is not clear at all from the example given.
This code works on Xamarin 5
however after upgrading to Xamarin 6
System.InvalidCastException: Unable to convert instance of type 'MvvmCross.Droid.Support.V7.AppCompat.Widget.MvxAppCompatAutoCompleteTextView' to type 'MvvmCross.Binding.Droid.Views.MvxAutoCompleteTextView'.
MVVMCross 4.4 libraries Xamarin.Android.Support.v4 - 23.3 Xamarin.Android.Support.v7 23.3
Tried solution clean, tried restart, tried closing and re-opening Xamarin. Tried upgrading to latest mvvmcross libraries and latest Xamarin.Android.Support.v4 & Xamarin.Android.Support.v7 - same issue
please help as this is holding up our latest release to production.