3

谁能解释为什么会发生此错误?

我使用媒体播放器从资产文件夹播放一个音频文件,并在可绘制文件夹的 imageview 中显示一些图像。项目是在 android 4.0.3 api 中构建的。

在将 admobsdk 添加到 project 之前,这非常有效。现在我无法在 imageview 中看到图像。谁能给我解决方案?

java.io.FileNotFoundException: /proc/mtprof/status: open failed: ENOENT (No such file or directory)
E/ActivityManager(  231):       at libcore.io.IoBridge.open(IoBridge.java:448)
E/ActivityManager(  231):       at java.io.FileInputStream.<init>(FileInputStream.java:78)
E/ActivityManager(  231):       at java.io.FileInputStream.<init>(FileInputStream.java:105)
E/ActivityManager(  231):       at com.android.server.am.ActivityRecord.mtProf(ActivityRecord.java:852)
E/ActivityManager(  231):       at com.android.server.am.ActivityRecord.windowsDrawn(ActivityRecord.java:653)
E/ActivityManager(  231):       at com.android.server.am.ActivityRecord$Token.windowsDrawn(ActivityRecord.java:225)
E/ActivityManager(  231):       at com.android.server.wm.WindowManagerService$H.handleMessage(WindowManagerService.java:6994)
E/ActivityManager(  231):       at android.os.Handler.dispatchMessage(Handler.java:99)
E/ActivityManager(  231):       at android.os.Looper.loop(Looper.java:154)
E/ActivityManager(  231):       at com.android.server.wm.WindowManagerService$WMThread.run(WindowManagerService.java:754)
E/ActivityManager(  231): Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
E/ActivityManager(  231):       at libcore.io.Posix.open(Native Method)
E/ActivityManager(  231):       at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
E/ActivityManager(  231):       at libcore.io.IoBridge.open(IoBridge.java:432)

代码

AssetFileDescriptor descriptor;
mediaPlayer = new MediaPlayer();
mediaPlayer.setOnCompletionListener(this);
descriptor = getAssets().openFd("test.mp3" );
mediaPlayer.setDataSource(descriptor.getFileDescriptor(), descriptor.getStartOffset(), descriptor.getLength() );
descriptor.close();
mediaPlayer.prepare();
mediaPlayer.start();
buttonPlay.setBackgroundDrawable(getResources().getDrawable(R.drawable.pause_button));
buttonPlay.setTag(getResources().getString(R.string.pause));
4

0 回答 0