嗨,希望你一切都很好,当我尝试在视频视图中打开我的视频时出现问题它生成错误视频
Error: 1,-2147483648
所以有任何解决方法来解决它...
Video.java
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.widget.VideoView;
@SuppressWarnings("deprecation")
public class Video extends ActionBarActivity {
String video_src="media";
String video_file_name="Surah_Rahman.mp4";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_video);
VideoView vidView = (VideoView)findViewById(R.id.myVideo);
// vidView.setVideoURI(video_src+"/"+video_file_name);
vidView.setVideoPath(video_src+"/"+video_file_name);
vidView.start();
}
}
LOGKAT
11-05 11:06:34.364: I/dalvikvm(920): threadid=3: reacting to signal 3
11-05 11:06:34.384: I/dalvikvm(920): Wrote stack traces to '/data/anr/traces.txt'
11-05 11:06:34.444: E/MediaPlayer(920): error (1, -2147483648)
11-05 11:06:34.694: E/MediaPlayer(920): Error (1,-2147483648)
11-05 11:06:34.694: D/VideoView(920): Error: 1,-2147483648
答案 0 :(得分:0)
此错误:1,-2147483648是未知错误。这是关于你的视频的编码格式你可以在这些链接中看到这个问题: Can't play mp4 video in my Android app
Android MediaPlayer error (1, -2147483648)
http://developer.android.com/guide/appendix/media-formats.html