teesp
teesp

Reputation: 41

Error:error: '#fffffffff' is incompatible with attribute android:color (attr) color

enter image description here

can anyone help me solve the problem?

Upvotes: 3

Views: 11675

Answers (3)

Radesh
Radesh

Reputation: 13555

I have same problem when use custom attribute and figure out i wrongly use

#00fffff

I forgot one f, So don't forget that hex color can have 3 digits or 6 digits or 8 digits

Upvotes: 0

Paras
Paras

Reputation: 3235

Color Hex Code should be of max 8 digit, where first 2 values represent the alpha value and last 6 digits results for the color (rgb).

i.e:-

#FFFFFFFF
  |---------------- Alpha
     |-----------------------Color (#RGB) 

The value that you have used for colour contains 9Fs

Upvotes: 1

user6914251
user6914251

Reputation:

The color is incompatible with the android attribute color, try this <solid android:color="?attr/butBackColor" /> or android:background="#FFFFFF"

EDIT Also, here is a link for reference for colors https://stackoverflow.com/a/7323234/6914251

Upvotes: 0

Related Questions