Skip to content Skip to sidebar Skip to footer

Mediaplayer No Longer Working On The Emulator Since R10?

protected MediaPlayer _mediaPlayer; protected void playFromResource(int resId) { if (_mediaPlayer != null) { _mediaPlayer.sto

Solution 1:

I had this problem on my MacBook Pro and found that I had to turn off my Bluetooth before launching the emulator.

Solution 2:

I see this problem on mac os as well. In my case it happens when you enable "snapshot" for the emulator. http://code.google.com/p/android/issues/detail?id=14953 You will have to delete the emulator and make a new one without "snapshot" enabled.

Solution 3:

Looks like the issue is only on my computer. I just tryed it on another computer and it work fine. I had some issues when I upgraded to r10 of ADT. Maybe there is something wrong in my development setup.

Solution 4:

Launching the emulator manually helps in my case.

emulator program can be found inside android-sdk/tools/.

So the final command will be something like:

android-sdk/tools/emulator -avd my_cool_emulator_name

Solution 5:

Be sure you read MediaPlayer State Diagram and that you perform all requested actions when you close your MediaPlayer object; if you don't stop, reset and realeas it, next time you try to use it, it will be in an incoherent state so that you cannot start it.

For details: http://developer.android.com/reference/android/media/MediaPlayer.html

Post a Comment for "Mediaplayer No Longer Working On The Emulator Since R10?"