Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Attributes from MvxBindingAttributes are not added with MvvmCross

I have the MvxBindingAttributes.xml in my UI.Droid/Resources/Values but everytime I try to use the bindings in my layouts I get

Warning attribute is not declared.

No resource identifier found for attribute 'MvxBind' in package 'DroidUI'

so for some reason it cannot find those attributes. I have tried to close/reopen/clean/rebuild with no luck, tried removing the layouts and then building (Hoping it would add them at build) and then try to add them again, but nothing seems to work

like image 455
Mech0z Avatar asked Sep 26 '12 07:09

Mech0z


1 Answers

Have you checked that the MvxBindingAttributes.xml file is marked in properties as an AndroidResource?

VisualStudio likes marking the xml files as content or none instead - especially if you've added the MvxBindingAttributes.xml file as a link.


As an update to this, you can also now use a special 'auto' xml scheme:

     xmlns:local="http://schemas.android.com/apk/res-auto"

like image 53
Stuart Avatar answered Sep 17 '22 14:09

Stuart