所以,我有一个应用程序,我试图在底部循环一堆视频肖像。它在模拟器(Android 4.1)上运行良好,似乎可以在我的手机上运行(7.1)。
在设备上,我需要将应用程序部署到(一个旧的Android 4.0电视盒),视频显示为黑色,或者开始显示某些内容,然后很快就会变黑。
我尝试了4.0的模拟器,它似乎做了同样的事情,但我无法弄清楚为什么并搜索它拍摄的错误代码并不能拉出任何东西
它遍历所有肖像并创建如下视频视图: `
VideoView video = new VideoView(context);
boolean failure = false;
Log.d("videoPlayer", "Playing video: " + Environment.getExternalStorageDirectory()+"/reviews/" + localPortraits[i]);
video.setVideoPath(Environment.getExternalStorageDirectory()+"/reviews/" + localPortraits[i]);
video.setOnErrorListener(new MediaPlayer.OnErrorListener(){@Override
public boolean onError(MediaPlayer nmp, int what, int extra){
Log.d("MediaPlayer", "CAUGHT ERROR. ReDownload");
badMovie(nmp.toString());
return true;
}
});
video.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
mp.start();
mp.setLooping(true);
}
});
frame.addView(video);
}`
再次,在4.1模拟器中运行它可以很好地工作。当我把它放在4.0电视或4.0模拟器上时,它会发出这样的信息:
W/MediaPlayer: info/warning (8004, 0)
I/MediaPlayer: Info (8004,0)
W/MediaPlayer: info/warning (8004, 0)
I/MediaPlayer: Info (8004,0)
W/MediaPlayer: info/warning (8004, 0)
I/MediaPlayer: Info (8004,0)
I/VideoView: MediaPlayer:AMLOGIC_PLAYER Prepared
D/MediaPlayer: getMetadata
I/VideoView: Layout changed,left=3 top=3 right=80 bottom=140
I/VideoView: Layout changed,oldLeft=3 oldTop=3 oldRight=81 oldBottom=140
I/VideoView: .left=3.top=3.right=80.bottom=140.oldLeft=3.oldTop=3.oldRight=81.oldBottom=140.Rotation=0
I/VideoView: MediaPlayer:AMLOGIC_PLAYER Prepared
D/MediaPlayer: getMetadata
E/MediaPlayer: error (1, -33554484)
E/MediaPlayer: error (1, -1)
I/VideoView: MediaPlayer:AMLOGIC_PLAYER Prepared
D/MediaPlayer: getMetadata
E/MediaPlayer: error (1, -33554484)
E/MediaPlayer: error (1, -1)
在同样的路线上加上更多。
我在Android 4.0上运行的错误是什么?