Warning when creating shape in xml
android, android-studio
Solution
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.
Problem
I am trying to define a shape in an XML doc as follows: ``` <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:startColor="#FFFFFF" android:endColor="#00FF00" android:angle="270" /> <corners android:radius="3dp" /> <stroke android:width="5px" android:color="#000000" /> </shape> ``` However, I get the following warnings and errors: - Layout width and height to be defined (no example shows these as being defined) - Element corners not allowed here - element stroke not allowed here How can I clear these errors?