Android MediaPlayer Error (-38, 0) “stop called in state 0”

后端 未结 3 1424
误落风尘
误落风尘 2021-02-13 22:02

I have looked at various different websites looking for a solution for this problem in my code. It is a basic audio player with 3 buttons: play, pause and stop. Play and pause w

3条回答
  •  一向
    一向 (楼主)
    2021-02-13 22:48

    I fixed this problem by removing the player.stop() which was being called when the player finished the song because of player.setOnCompletionListener(). This has now resolved the problem and the player is working perfectly.

提交回复
热议问题