Mark McCabe
Mark McCabe

Reputation: 53

Width Error in eclipse

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

Answers (4)

kapilpanalink
kapilpanalink

Reputation: 51

Please don't use color individually. Instead, use

android:color="#A00080FF"

Upvotes: 0

Srijith
Srijith

Reputation: 1715

Please specify android:color instead of just color.

Upvotes: 0

Rahul Vishwakarma
Rahul Vishwakarma

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

Blackbelt
Blackbelt

Reputation: 157467

your problem is not width but colour. It should be fully qualified

 android:color="#A00080FF"

Upvotes: 4

Related Questions