Invalid file name error in Eclipse

I often encounter the following error:

res \ drawable \ my-image-48.png: Invalid file name: should only contain [a-z0-9 _.]

My file name is "my-image-48.png", which seems to comply with the restrictions listed in the error.

What am I missing?

+4
source share
3 answers

you cannot use a dash - , you can use letters (a to z), numbers (0 of 9) and underscores _ Therefore you must replace the β€œ-” with underscores.

+7
source

You cannot use - .

[a-z0-9_.] means you cannot use - , but you can use letters from a to z and numbers from 0 to 9 and underscores. Therefore, I recommend replacing - with _

+3
source

Dashes are not allowed in file names.

+1
source

Source: https://habr.com/ru/post/1347816/


All Articles