A raw folder holds files of any type. You need a raw
folder under your resources folder (res
). In your example, jam
is expected as a resource in the raw
folder, and will likely be a type of music file as you're using MediaPlayer
to try and read it.
You've this error raw cannot be resolved
because raw folder doesn't exist, and so the variable raw
in class R
is not being auto-generated.
Fix the problem by creating the raw
folder.
If you already have created res/raw
try cleaning the project. Sometimes Eclipse gets confused. If that doesn't work, make a small change to a source file, and save it so the auto-build process kicks off. Sometimes cleaning manually hasn't fixed the problem for me, its a known bug for Eclipse.