我正在尝试通过适用于 Android 的 Xamarin Studio MvvmCross 示例。我在这里上传了我的解决方案版本:https ://github.com/Krumelur/MvvmCrossTest
我的环境是 XS 4.0.13、X.iOS 7.0.2.7、X.Android 4.8.3。全独立版。
我尝试了 Stuart 博客文章中的版本,但我无法构建它,因为它需要 Xamarin 商业许可证,因为它引用了 System.ServiceModel,所以我无法比较它是否可以在那里工作。
运行应用程序时,每次在文本字段中输入字符时都会出现以下异常:
[0:] MvxBind:Error:132.38 SetValue failed with exception - TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MonoProperty.SetValue (System.Object obj, System.Object value, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] index, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.PropertyInfo.SetValue (System.Object obj, System.Object value, System.Object[] index) [0x00000] in <filename unknown>:0
at Cirrious.MvvmCross.Binding.Bindings.Source.Leaf.MvxLeafPropertyInfoSourceBinding.SetValue (System.Object value) [0x00080] in c:\Projects\Misc\MVVMCROSS\Cirrious\Cirrious.MvvmCross.Binding\Bindings\Source\Leaf\MvxLeafPropertyInfoSourceBinding.cs:86
InnerException was TypeLoadException: Could not load type 'System.Linq.Expressions.Expression' from assembly 'AndroidDemo.Core'.
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at Cirrious.MvvmCross.Binding.Bindings.Source.Leaf.MvxLeafPropertyInfoSourceBinding.SetValue (System.Object value) [0x00080] in c:\Projects\Misc\MVVMCROSS\Cirrious\Cirrious.MvvmCross.Binding\Bindings\Source\Leaf\MvxLeafPropertyInfoSourceBinding.cs:86
InnerException was TypeLoadException: Could not load type 'System.Linq.Expressions.Expression' from assembly 'AndroidDemo.Core'.
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0