help
help

Reputation: 851

java android: res\drawable-hdpi\Restaurant-Blue-2-icon.png: Invalid file name: must contain only [a-z0-9_.], cant fix

i am getting:

[2012-06-10 12:47:39 - pet_game] Launch canceled!
[2012-06-10 12:49:13 - pet_game] res\drawable-hdpi\Restaurant-Blue-2-icon.png: Invalid file name: must contain only [a-z0-9_.]
[2012-06-10 12:49:13 - pet_game] res\drawable-hdpi\Restaurant-Blue-2-icon.png: Invalid file name: must contain only [a-z0-9_.]
[2012-06-10 12:49:13 - pet_game] res\drawable-hdpi\Restaurant-Blue-2-icon.png: Invalid file name: must contain only [a-z0-9_.]
[2012-06-10 12:49:13 - pet_game] res\drawable-hdpi\Restaurant-Blue-2-icon.png: Invalid file name: must contain only [a-z0-9_.]
[2012-06-10 12:49:13 - pet_game] res\drawable-hdpi\Restaurant-Blue-2-icon.png: Invalid file name: must contain only [a-z0-9_.]
[2012-06-10 12:49:13 - pet_game] res\drawable-hdpi\baseball-icon.png: Invalid file name: must contain only [a-z0-9_.]

I know this is due to the fact that i have upper case letter in the image file name so I deleted those two files. However, I still get same error. I tried to refresh the entire project and restarting eclipse, but it didnt help. what should i do?

Upvotes: 2

Views: 3830

Answers (3)

Jainendra
Jainendra

Reputation: 25143

Uppercases are not allowed for resource names. Only lowercases(a-z), numbers0-9, .(dot) and _(underscore)are valid.
Use Restaurant_Blue_2_icon.png and baseball_icon.png for the image names.

Upvotes: 1

Moritz
Moritz

Reputation: 10352

Don't use: -. Instead use: _.

Upvotes: 4

Vipul
Vipul

Reputation: 28093

baseball-icon.png is too invalid name change it to baseball_icon.png and you are good to go.

Upvotes: 0

Related Questions