问题描述
突然之间,我的TextInputEditText的绑定开始失败,并且与链接程序有关.如果我将链接器设置为无",则一切正常.即时通讯使用的其他许多绑定仍然可以正常工作.
All of a sudden the binding for my TextInputEditText started failing, and it has something to do with the Linker. If I set the linker to "None", everything works as intended. Alot of other bindings im using still works just fine.
堆栈即时获取:
我已经将以下内容添加到"LinkerPleaseInclude"中,但没有帮助.
I've already added the following to "LinkerPleaseInclude", but it didnt help.
public void Include(TextInputEditText text)
{
text.TextChanged += (sender, args) => text.Text = "" + text.Text;
text.Hint = "" + text.Hint;
text.Background = (Drawable)Android.Resource.Color.Black;
text.Text = "Text" + text.Text;
}
public void Include(TextInputLayout text)
{
text.Hint = "" + text.Hint;
text.Background = (Drawable)Android.Resource.Color.Black;
}
将TextInputEditText更改为简单的EditText都不起作用,并且会引发相同的异常.
Changing the TextInputEditText to a simple EditText, doesnt help either and throws the same exception.
我想念什么?通过查看堆栈,我无法更接近解决方案.
What am I missing? Im not getting any closer to a solution by looking at the stack.
推荐答案
经过一番挖掘,我发现了这个答案显示MvvmCross的新版本(v4.4.0)中发生了更改,需要对项目的LinkerPleaseInclude.cs
After some digging around I found this answer that shows there was a change in the new version (v4.4.0) of MvvmCross that requires a tweak to the section for TextView in your project's LinkerPleaseInclude.cs
这篇关于TextInputEditText:ArgumentNullException:MvxWeakEventSubscription中缺少源事件信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!