java - R can not be resolved while using MediaPlayer -
java - R can not be resolved while using MediaPlayer -
import android.media.mediaplayer; mediaplayer mp = mediaplayer.create(moschipactivitysec.this, r.raw.button);
here button .mp3 sound file resides in raw folder in res,getting r not resolved!
two things might causing this.
firstly have @ imports section of class. eclipse imports different r file, causes error. if there's in imports imports random r file delete line.
otherwise r file hasn't been created properly, clean , rebuild fixes, other times i've had delete r file , rebuild.
if neither of these prepare allow know.
java android eclipse android-intent eclipse-plugin
Comments
Post a Comment