在android中播放视频时出错

时间:2015-11-05 06:30:05

标签: android android-videoview

嗨,希望你一切都很好,当我尝试在视频视图中打开我的视频时出现问题它生成错误视频  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

1 个答案:

答案 0 :(得分:0)