我试图创建一个 MediaPlayer。首先,我在其上添加了一个本地 MP3 文件(通过原始目录)
final MediaPlayer mp = MediaPlayer.create(MainActivity.this,R.raw.local_track_1);
mp.start();
一切正常,现在我尝试加载 M3U 播放列表
final MediaPlayer mp = MediaPlayer.create(MainActivity.this,R.raw.playlist1_local_simple);
mp.start();
但现在我收到以下错误:
02-19 02:34:54.046 4743-4743/net.test.m3uclient E/MediaPlayer-JNI: QCMediaPlayer mediaplayer NOT present
02-19 02:34:54.066 4743-4763/net.test.m3uclient E/MediaPlayer: error (1, -2147483648)
02-19 02:34:54.067 4743-4743/net.test.m3uclient D/MediaPlayer: create failed:
java.io.IOException: Prepare failed.: status=0x1
at android.media.MediaPlayer._prepare(Native Method)
at android.media.MediaPlayer.prepare(MediaPlayer.java:1154)
at android.media.MediaPlayer.create(MediaPlayer.java:933)
at android.media.MediaPlayer.create(MediaPlayer.java:904)
at net.test.m3uclient.MainActivity.onCreate(MainActivity.java:28)
at android.app.Activity.performCreate(Activity.java:6088)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2307)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.access$900(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1322)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5300)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
02-19 02:34:54.106 4743-4743/net.test.m3uclient D/AppTracker: App Event: start
02-19 02:34:54.123 4743-4786/net.test.m3uclient D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
02-19 02:34:54.125 4743-4743/net.test.m3uclient D/Atlas: Validating map...
02-19 02:34:54.130 4743-4759/net.test.m3uclient W/MediaPlayer-JNI: MediaPlayer finalized without being released
M3U Simple 的内容:
local_track_1.mp3
信息: 不管我使用的是简单的还是扩展的 M3U 文件,错误都是一样的