我已经使用MvvmCross两年多了,但是这个最新的安卓问题被难住了。我显然遗漏了一些东西。
我已经使用最新版本升级了我的Xamarin和MonoDevelop。我一直在使用Mvx热金枪鱼3.5,并尝试升级到3.5.1,没有任何不同的结果。基本上,每个使用绑定的视图都会令人沮丧地失败,并在输出窗口中显示MvxBind:Error,视图变成空白。
我还通过尝试手动提供程序集和命名空间来更改setup类。我有急事要解决,斯图尔特,请指教。
MvxBind:Error:100,93 View type not found - md52d382d08e2b5b5a41f8bed5ba30f5cc4.BindableListView这方面的一个例子是我的configuration视图中的绑定。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/style_background">
<Monovage.BindableListView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:cacheColorHint="#00000000"
local:MvxBind="ItemsSource Thresholds"
local:MvxItemTemplate="@layout/listitem_usagethreshold"
android:layout_marginTop="0dp" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:orientation="vertical"
android:background="@drawable/style_background">
<ProgressBar
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="false"
android:layout_centerInParent="true"
local:MvxBind="Visibility IsBusy, Converter=Visibility" />
</RelativeLayout>
</LinearLayout>可绑定列表视图是从MvxListView继承的列表视图
公共类BindableListView : MvxListView
发布于 2015-05-06 20:58:15
我昨天才用BindingFlowLayout处理了这个问题。我通过调整布局文件中的前缀解决了MvxBind:错误...
<BindingFlowLayout
android:id="@+id/AllShowsFlow"
android:orientation="horizontal"
local:MvxItemTemplate="@layout/appmoviesgriditem"
local:MvxBind="ItemsSource TVShows"
android:minWidth="25px"
android:minHeight="25px"
android:layout_marginLeft="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />并添加组件设置。
protected override IList<Assembly> AndroidViewAssemblies
{
get
{
var assemblies = base.AndroidViewAssemblies;
assemblies.Add(typeof(MvxExtensions.BindingFlowLayout).Assembly);
assemblies.Add(typeof(MvxExtensions.FlowLayout).Assembly);
return assemblies;
}
}基于Stuart在这里的回答:
MvxBind:Error: View type not found - mvvmemiextensions.EmiDatePicker
然而,这个错误在我的应用程序中是良性的,它从来没有造成任何问题。
发布于 2015-05-09 01:47:39
我也遇到了同样的问题,但是对于BindableExpandableListView,我得到了错误
[MvxBind] 237.25 View type not found - md58cb9ccb4af6afc62c0aa8757d7b275d0.BindableExpandableListView 我在布局文件里有这个
<DeapExtensions.Binding.Droid.Views.BindableExpandableListView
android:id="@+id/openExpandableListView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawSelectorOnTop="true"
android:stackFromBottom="false"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="15dp"
local:MvxBind="ItemsSource WrappedCategories"
local:MvxItemTemplate="@layout/rowopentask"
local:GroupItemTemplate="@layout/rowcategory" />我只是删除了所有的前缀,如下所示
<BindableExpandableListView
android:id="@+id/openExpandableListView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawSelectorOnTop="true"
android:stackFromBottom="false"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="15dp"
local:MvxBind="ItemsSource WrappedCategories"
local:MvxItemTemplate="@layout/rowopentask"
local:GroupItemTemplate="@layout/rowcategory" />这似乎起到了作用。
发布于 2015-09-29 22:45:32
修复方法是MvvmCross不假设从C#到Java类型名称的1:1映射,可以使用以下代码片段从C#类型中获取底层Java类型名称:
string javaClassName = Java.Lang.Class.FromType(typeof(MyActivity));https://stackoverflow.com/questions/30076653
复制相似问题