Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- getWindow().setFormat(PixelFormat.TRANSLUCENT);
- setContentView(R.layout.videoview);
- File musicFile = new File( Environment.getExternalStorageDirectory(),
- "documentariesandyou.mp4");
- String path = musicFile.getAbsolutePath();
- mVideoView = (VideoView) findViewById(R.id.surface_view);
- mVideoView.setVideoPath(path);
- mVideoView.setMediaController(new MediaController(this));
- mVideoView.requestFocus();
- }
- 05-25 01:42:28.622: WARN/MediaPlayer(11807): info/warning (1, 26)
- 05-25 01:42:28.622: ERROR/PlayerDriver(95): HandleErrorEvent: PVMFErrProcessing
- 05-25 01:42:28.632: ERROR/MediaPlayer(11807): error (1, -18)
- 05-25 01:42:28.632: ERROR/AndroidRuntime(11807): FATAL EXCEPTION: main
- 05-25 01:42:28.632: ERROR/AndroidRuntime(11807): java.lang.NullPointerException
- 05-25 01:42:28.632: ERROR/AndroidRuntime(11807): at android.widget.VideoView$2.onPrepared(VideoView.java:389)
- 05-25 01:42:28.632: ERROR/AndroidRuntime(11807): at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:1364)
- 05-25 01:42:28.632: ERROR/AndroidRuntime(11807): at android.os.Handler.dispatchMessage(Handler.java:99)
- 05-25 01:42:28.632: ERROR/AndroidRuntime(11807): at android.os.Looper.loop(Looper.java:123)
- 05-25 01:42:28.632: ERROR/AndroidRuntime(11807): at android.app.ActivityThread.main(ActivityThread.java:4633)
- 05-25 01:42:28.632: ERROR/AndroidRuntime(11807): at java.lang.reflect.Method.invokeNative(Native Method)
- 05-25 01:42:28.632: ERROR/AndroidRuntime(11807): at java.lang.reflect.Method.invoke(Method.java:521)
- 05-25 01:42:28.632: ERROR/AndroidRuntime(11807): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
- 05-25 01:42:28.632: ERROR/AndroidRuntime(11807): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
- 05-25 01:42:28.632: ERROR/AndroidRuntime(11807): at dalvik.system.NativeStart.main(Native Method)
Add Comment
Please, Sign In to add comment