问题
I have a strange behaviour in the sense that an app which works perfectly fine in debug mode behaves differently when in release mode. More in particular, I use a couple of togglebuttons with dual property binding for which the binding works when compiled and deployed for debug while it doesn't anymore when in release mode. All other used widgets, including normal buttons seem to work just fine. AXML snippet for one of the buttons here included:
<ToggleButton
android:layout_width="match_parent"
android:layout_height="80dp"
android:id="@+id/bindtoggleeco"
local:MvxBind="Click EcoToggleCommand;Checked EcoModeToggle"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginTop="0dp"
android:layout_marginBottom="10dp"
android:textSize="25sp" />
What could cause such behaviour ? I honestly have no clue where to start looking as it works perfectly fine when debugging... Also don't know whether it's the Click property binding that fails or the Checked one.
EDIT: Some more info: - behaviour is observed in 4.0.3;4.1.2 and 4.2.2 with minimum & target API set to 4.0.3 - I seem to get hundreds of messages in the outputwindow that weren't there bin debug mode (Visual studio is connected to the emulator for testing) "02-27 01:04:37.812 W/Trace ( 2044): Unexpected value from nativeGetEnabledTags: 0"
来源:https://stackoverflow.com/questions/22056747/mvvmcross-android-togglebutton-binding-doesnt-seem-to-work-in-release-mode