I have used the mediaplayer before, and I have never had this problem. Whenever I try to use MediaPlayer.create(), the method gives me null, and I can't play my sounds. Is there anything that I am missing?
public class Game extends Activity
private MediaPlayer mp = null;
protected void onCreate(Bundle savedInstanceState)
mp = MediaPlayer.create(getBaseContext(), R.raw.sound);
The create() API returns null if it somehow failed.
The reason in this case is due to a corrupt mp3 file.