I received an answer on this by dot42 support:
You can fix this by adding an [EventHandler] attribute (from Dot42.EventHandlerAttribute) to the sendMessage method like this:
[EventHandler]
public void sendMessage(View view)
{
Toast.MakeText(this, "Button pressed", Toast.LENGTH_LONG).Show();
}
This ensures that the sendMessage method is not renamed and included in the APK. dot42 will by default try to remove as much code as possible and since sendMessage is not referenced (from code) it will remove it. Adding the attribute prevents that.