[Solved] Android mediaplayer.prepare() Error: Caused by: java.lang.IllegalStateException

If there are any errors, please correct them

      Caused by: java.lang.IllegalStateException
        at android.media.MediaPlayer._ prepare(Native Method)
        at android.media.MediaPlayer.prepare(MediaPlayer.java:1274)

 

Pay attention to the status of mediaplayer. Add a reset sentence before prepare to reduce the number of error reports

Read More: