I have a weird bug in my MVVMCross app.
Considering the following scenario:
<Switch
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:clickable="false"
android:layout_alignParentRight="true"
android:id="@+id/activatedSwitch"
local:MvxBind="Checked IsActive" />
- Compile version: level 14
- Minimum version: level 14
Target version: level 14
Linking: Sdk Assemblies Only
Android Phone version is 4.1.2.
When I run the app in Debug mode, all is ok.
But when I run it in Release, the binding to the Checked property failed with the following error:
E/MvxBind (11670): 12,70 View type not found - Switch
Since MvvmCross uses reflection to perform databinding, the linker is not seeing the
Checked
property and is not including it in your binary. There is a file nameLinkerPleaseInclude.cs
that you can edit to add a reference to this property.Something like: