Reputation: 53
I'm trying to develop my first app and I'm receiving the following error:-
<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>
It says on the width line above " attribute is missing the android namespace prefix"
Can anybody please help?
Upvotes: 1
Views: 137
Reputation: 51
Please don't use color individually. Instead, use
android:color="#A00080FF"
Upvotes: 0
Reputation: 996
You code should be like.
Replace color
with android:color
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#F0A0A0A0"/>
<stroke android:width="2dp" android:color="#A00080FF"/>
<padding android:left="5dp" android:top="0dp"
android:right="5dp" android:bottom="1dp" />
</shape>
Upvotes: 1
Reputation: 157467
your problem is not width but colour. It should be fully qualified
android:color="#A00080FF"
Upvotes: 4