Video Player Kod Sorunu
30.12.2013 - 01:01
Merhabalar, bir proje üstünde çalışıyorum. Neredeyse bitti, ama her zamanki gibi hata oluştu. Video player kod ve arayüzünü internetten örnek olarak aldım. Aldığım kodda sorun çıktı. İlk defa böyle bir proje yazdığımdan anlayamadım... Hatalı java dosyasını ekte gönderdim, incelerseniz çok teşekkür ederim.
DEBUG'DA AŞAĞIDA ALTI ÇİZİLİ YERLERDE HATA GÖSTERİYOR;
- private SurfaceHolder holder;
- holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
- int screenWidth = getWindowManager().getDefaultDisplay().getWidth();
- int screenHeight = getWindowManager().getDefaultDisplay().getHeight();
LOGCAT;
- 12-30 00:50:30.218: W/dalvikvm(14751): threadid=1: thread exiting with uncaught exception (group=0x410d92a0)
- 12-30 00:50:30.228: E/AndroidRuntime(14751): FATAL EXCEPTION: main
- 12-30 00:50:30.228: E/AndroidRuntime(14751): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.monsterdroid.p90xvideo/com.monsterdroid.p90xvideo.VideoSample}: java.lang.IllegalArgumentException: The surface has been released
- 12-30 00:50:30.228: E/AndroidRuntime(14751): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2092)
- 12-30 00:50:30.228: E/AndroidRuntime(14751): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2117)
- 12-30 00:50:30.228: E/AndroidRuntime(14751): at android.app.ActivityThread.access$700(ActivityThread.java:134)
- 12-30 00:50:30.228: E/AndroidRuntime(14751): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1218)
- 12-30 00:50:30.228: E/AndroidRuntime(14751): at android.os.Handler.dispatchMessage(Handler.java:99)
- 12-30 00:50:30.228: E/AndroidRuntime(14751): at android.os.Looper.loop(Looper.java:137)
- 12-30 00:50:30.228: E/AndroidRuntime(14751): at android.app.ActivityThread.main(ActivityThread.java:4867)
- 12-30 00:50:30.228: E/AndroidRuntime(14751): at java.lang.reflect.Method.invokeNative(Native Method)
- 12-30 00:50:30.228: E/AndroidRuntime(14751): at java.lang.reflect.Method.invoke(Method.java:511)
- 12-30 00:50:30.228: E/AndroidRuntime(14751): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007)
- 12-30 00:50:30.228: E/AndroidRuntime(14751): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774)
- 12-30 00:50:30.228: E/AndroidRuntime(14751): at dalvik.system.NativeStart.main(Native Method)
- 12-30 00:50:30.228: E/AndroidRuntime(14751): Caused by: java.lang.IllegalArgumentException: The surface has been released
- 12-30 00:50:30.228: E/AndroidRuntime(14751): at android.media.MediaPlayer._setVideoSurface(Native Method)
- 12-30 00:50:30.228: E/AndroidRuntime(14751): at android.media.MediaPlayer.setDisplay(MediaPlayer.java:689)
- 12-30 00:50:30.228: E/AndroidRuntime(14751): at com.monsterdroid.p90xvideo.VideoSample.onCreate(VideoSample.java:92)
- 12-30 00:50:30.228: E/AndroidRuntime(14751): at android.app.Activity.performCreate(Activity.java:5047)
- 12-30 00:50:30.228: E/AndroidRuntime(14751): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
- 12-30 00:50:30.228: E/AndroidRuntime(14751): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2056)
- 12-30 00:50:30.228: E/AndroidRuntime(14751): ... 11 more
Bir de güzel bir Video Player örneği olan varsa ulaşabilir mi? Çok acil lazım bu aralar... fkurt97@gmail.com
16
Görüntülenme
0 Beğeni