Raw cannot be resolved or is not a field error (Eclipse / Android / Java)

For some odd reason, I get this error: raw cannot be resolved or is not a field

I am trying to do the following

  MediaPlayer click = MediaPlayer.create(this, R.raw.button_click.mp3); 

in my onCreate method.

I checked the folder and mp3 file, and <project-name>/raw/button_click.mp3 . I tried:

  • Cleaning my project
  • Restart Eclipse
  • Do it R.raw.button_click
  • Checking if everything is at the bottom and is spelled correctly

Help me please!

+4
source share
1 answer

Should it not be in the project name / res / raw, and not in the project name / raw?

+11
source

All Articles