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" />
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 name LinkerPleaseInclude.cs
that you can edit to add a reference to this property.
Something like:
public void Include(Switch @switch)
{
@switch.CheckedChange += (sender, args) => @switch.Checked = [email protected];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With