The attribute is not declared (Android) on basic xml attributes

后端 未结 3 1680
灰色年华
灰色年华 2020-12-14 07:48

I\'m new to this Android development, and I find the layout of it really confusing. I\'m trying to have a background image on a view, and I\'ve tried using this example Add

3条回答
  •  生来不讨喜
    2020-12-14 08:05

    Problem

    Intellisense could not pick the attributes we type although those attributes are existing in android SDK and shows this Attribute is not declared.

    Solution

    I got this problem yesterday in Visual Studio 2015 and started searching about this, ultimately I found that these two files are missing in XML schema folder in Visual Studio, so download these files links given below,

    1. https://github.com/atsushieno/monodroid-schema-gen/blob/master/android-layout-xml.xsd
    2. https://github.com/atsushieno/monodroid-schema-gen/blob/master/schemas.android.com.apk.res.android.xsd

    Just download and move files manually to C:\Program Files (x86)\Microsoft Visual Studio 14.0\Xml\Schemas or simply just add these schemas within Visual Studio. This error will be gone, I resolved this issue with this procedure.

提交回复
热议问题