Invalid file name error in Eclipse
I often encounter the following error:
res\drawable\my-image-48.png: Invalid file name: must contain only [a-z0-9_.]
My file name is "my-image-48.png" w开发者_C百科hich seems to conform to the constraints listed in the error.
What am I missing?
you cannot use the dash -
, you only can use letters (from a to z), numbers (0 from 9) and underscores _
So you should replace "-" by underscores.
You can't use -
.
[a-z0-9_.]
means not you can use -
, but that you can use letters from a to z and numbers form 0 to 9 and underscores. Therefore I recommend to substitute -
with _
The dash is not authorized in file names.
精彩评论