1
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="#F0A0A0A0"/>
    **<stroke android:width="2dp" color="#A00080FF"/>**
    <padding android:left="5dp" android:top="0dp"
        android:right="5dp" android:bottom="1dp" />
</shape>

I get the above error on the bold lines. "Attribute is missing the Android namespace prefix"

2 Answers 2

5

This

  <stroke android:width="2dp" color="#A00080FF"/>

should be

  <stroke android:width="2dp" android:color="#A00080FF"/> 
1

use android:color="#A00080FF"

instead of color="#A00080FF"

Sample::

<?xml version="1.0" encoding="UTF-8"?> 
<shape xmlns:android="http://schemas.android.com/apk/res/android" 
     android:shape="rectangle"> 
     <stroke android:width="2dp" android:color="#FFFFFFFF" />
     <gradient android:startColor="#DD000000" android:endColor="#DD2ECCFA" 
            android:angle="225"/> 

    <corners android:bottomRightRadius="7dp" android:bottomLeftRadius="7dp" 
     android:topLeftRadius="7dp" android:topRightRadius="7dp"/> 
</shape> 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.