当我使用MediaPlayer时,它显示“E / ExtMediaPlayer-JNI:env-> IsInstanceOf失败”错误。怎么解决?

时间:2018-05-08 13:58:48

标签: java android android-mediaplayer media-player

我从原始目录中读取mp3文件,它工作正常,但每次启动媒体播放器时都显示一些错误(在下面)。

我的代码是......

player1 = MediaPlayer.create(view.getContext(), R.raw.song1);
player2 = MediaPlayer.create(view.getContext(), R.raw.song2);
PlaySound(player1):

public void PlaySound(MediaPlayer mediaPlayer ){
    if (mediaPlayer != null) {
       mediaPlayer.start();
      }
}

Erorr是..

E/ExtMediaPlayer-JNI: env->IsInstanceOf fails
E/MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
E/MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
E/ExtMediaPlayer-JNI: env->IsInstanceOf fails
E/MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
E/ExtMediaPlayer-JNI: env->IsInstanceOf fails
E/MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0

预先谢谢, 我希望任何人都可以帮助我..

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题,解决方法是在测试的地方重新启动平板电脑,然后运行良好。