David
David

Reputation: 20063

Since doing a clean project, android app can't find XML values

I keep getting errors in my class now that I ran a "clean" in Eclipse on my android app.

My XML is in /res/layout/main.xml and has the following code, my audio files are in /res/raw/ and are named "intro.mp3" and "newintro.mp3"...

When I call the values in my code though, I now get "cannot be resolved or is not a field" this has only happened since I ran clean on my project.

    final MediaPlayer oldintro = MediaPlayer.create(this, R.raw.intro);
    final MediaPlayer newintro = MediaPlayer.create(this, R.raw.newintro);

Any ideas?

Thanks,

Upvotes: 0

Views: 70

Answers (1)

Vito Gentile
Vito Gentile

Reputation: 14366

Directory raw must be a subdirectory of res... Probably this is the problem

Upvotes: 1

Related Questions