我从原始目录中读取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();
}
}
埃罗尔是..
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
提前感谢, 我希望任何人都可以帮助我..
我遇到了同样的问题,解决方案是在我测试的地方重新启动平板电脑,然后效果很好。