I am trying to define a shape in an XML doc as follows:
<corners android:radius="3dp" />
<stroke android:width="5px" android:color="#000000" />
However, I get the following warnings and errors:
How can I clear these errors?
That XML file should be located in
res/drawable. Given the errors you just mentioned I assume it is located in
res/layout, which is an incorrect location.
I had the same problem due to the fact that i surrounded the same code with tag "selector", it was put automatically from android studio. "selector" must be changed with "shape" for have border and avoid warning