1

I got the error E/MediaPlayer: Should have subtitle controller already set when I try to play a sound by clicking a button.

    public void clicaSom(View view) {
    MediaPlayer somPickObjeto = MediaPlayer.create(this, R.raw.pegaitem);
    somPickObjeto.start();

}
Luiz Henrique Ugliano
  • 1,317
  • 2
  • 13
  • 26
  • 1
    Possible duplicate of [Should have subtitle controller already set Mediaplayer error Android](http://stackoverflow.com/questions/20087804/should-have-subtitle-controller-already-set-mediaplayer-error-android) – Fabio says Reinstate Monica Sep 16 '16 at 14:52

1 Answers1

0

This log message is a known API error when playing audio only. You should just ignore it, or if you want to get rid of it there is an example here: Should have subtitle controller already set Mediaplayer error Android

Community
  • 1
  • 1
ak93
  • 1,135
  • 16
  • 27
  • 1
    Does this mean this question is a duplicate of the one you have found? If so, it should be marked as such – Fabio says Reinstate Monica Sep 16 '16 at 13:08
  • Yes it is. I wanted to mark it as such, but I can't find how to do it. There used to be a nice button around here somewhere, but I can't seem to find it. If you can, please mark it as duplicate. Thank you. – ak93 Sep 16 '16 at 14:19