After adding a spesific sound file to res / raw, I get an error (java - android), why?

After adding the sound file "do.mp3" to res / raw I get this error:

res \ raw \ do.mp3: 0: error: invalid character: 'do'

And they don't refer to it in the R class. How do I fix this?

+2


a source to share


1 answer


The android way generates R values ​​.... Basically it makes it so that Java reserved keywords cannot be used as filenames.



If you look at gen. [project.path] .R.java, you will see a static int for each resource. The names must be valid java names as this is a Java file.

+7


a source







All Articles