{"action":"created","issue":{"url":"https://api.github.com/repos/MvvmCross/MvvmCross/issues/1174","labels_url":"https://api.github.com/repos/MvvmCross/MvvmCross/issues/1174/labels{/name}","comments_url":"https://api.github.com/repos/MvvmCross/MvvmCross/issues/1174/comments","events_url":"https://api.github.com/repos/MvvmCross/MvvmCross/issues/1174/events","html_url":"https://github.com/MvvmCross/MvvmCross/issues/1174","id":117083341,"number":1174,"title":"Problem creating target binding for CompoundButton","user":{"login":"joashmusyoka","id":10183041,"avatar_url":"https://avatars.githubusercontent.com/u/10183041?v=3","gravatar_id":"","url":"https://api.github.com/users/joashmusyoka","html_url":"https://github.com/joashmusyoka","followers_url":"https://api.github.com/users/joashmusyoka/followers","following_url":"https://api.github.com/users/joashmusyoka/following{/other_user}","gists_url":"https://api.github.com/users/joashmusyoka/gists{/gist_id}","starred_url":"https://api.github.com/users/joashmusyoka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joashmusyoka/subscriptions","organizations_url":"https://api.github.com/users/joashmusyoka/orgs","repos_url":"https://api.github.com/users/joashmusyoka/repos","events_url":"https://api.github.com/users/joashmusyoka/events{/privacy}","received_events_url":"https://api.github.com/users/joashmusyoka/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2015-11-16T09:30:39Z","updated_at":"2015-11-17T09:53:34Z","closed_at":"2015-11-17T09:53:34Z","body":"I have the following Switch\r\n\r\n```xml\r\n<Switch\r\n        android:id=\"@+id/enableExtensiveLogging\"\r\n        android:layout_width=\"wrap_content\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:layout_below=\"@id/android_toolbar\"\r\n        android:text=\"Allow Extensive Logging?\"\r\n        android:layout_alignParentRight=\"true\"\r\n        android:layout_marginBottom=\"@dimen/margin_default_large\"\r\n        local:MvxBind=\"Checked AlloweExtendedLogging; Text CheckedText\" />\r\n```\r\n\r\nAnd in Setup.cs I have\r\n\r\n```c#\r\nprotected override void FillTargetFactories(IMvxTargetBindingFactoryRegistry registry)\r\n        {\r\n            base.FillTargetFactories(registry);\r\n            registry.RegisterFactory(new MvxSimplePropertyInfoTargetBindingFactory(typeof(MvxCompoundButtonCheckedTargetBinding), typeof(CompoundButton), \"Checked\"));\r\n        }\r\n```\r\n\r\nWhen the app starts I get in the Android Log an exception that:\r\n\r\n> Problem creating target binding for CompoundButton - exception System.MissingMethodException: No constructor found for Cirrious.MvvmCross.Binding.Droid.Target.MvxCompoundButtonCheckedTargetBinding::.ctor(Android.Widget.Switch, System.Reflection.MonoProperty)\r\n\r\nHow should I use the MvxCompoundButtonCheckedTargetBinding"},"comment":{"url":"https://api.github.com/repos/MvvmCross/MvvmCross/issues/comments/157323482","html_url":"https://github.com/MvvmCross/MvvmCross/issues/1174#issuecomment-157323482","issue_url":"https://api.github.com/repos/MvvmCross/MvvmCross/issues/1174","id":157323482,"user":{"login":"joashmusyoka","id":10183041,"avatar_url":"https://avatars.githubusercontent.com/u/10183041?v=3","gravatar_id":"","url":"https://api.github.com/users/joashmusyoka","html_url":"https://github.com/joashmusyoka","followers_url":"https://api.github.com/users/joashmusyoka/followers","following_url":"https://api.github.com/users/joashmusyoka/following{/other_user}","gists_url":"https://api.github.com/users/joashmusyoka/gists{/gist_id}","starred_url":"https://api.github.com/users/joashmusyoka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joashmusyoka/subscriptions","organizations_url":"https://api.github.com/users/joashmusyoka/orgs","repos_url":"https://api.github.com/users/joashmusyoka/repos","events_url":"https://api.github.com/users/joashmusyoka/events{/privacy}","received_events_url":"https://api.github.com/users/joashmusyoka/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T09:53:34Z","updated_at":"2015-11-17T09:53:34Z","body":"I have sorted the issue as follows:\r\n\r\nUnder project properties, -> Android Options in the Packaging tab. DO NOT check 'Use Shared Runtime'\r\n\r\nIn LinkerConfiguration.xml Add\r\n```xml\r\n  <assembly fullname=\"Cirrious.MvvmCross.Binding.Droid\">\r\n    <type fullname=\"Cirrious.MvvmCross.Binding.Droid.Target.MvxCompoundButtonCheckedTargetBinding\">\r\n      <method name=\".ctor\" />\r\n    </type>\r\n  </assembly>\r\n```\r\n\r\nClean and rebuild."}}