java.lang.RuntimeException: Method called after release()

主要引起是因為在

camera.stopPreview();
  camera.release();
前沒有將setPreviewCallback 設置為null,

解決情況:

public void surfaceDestroyed(SurfaceHolder holder) {
  camera.setPreviewCallback(null) ;
  camera.stopPreview();
  camera.release();
  camera = null;
  Log.e("CameraPreview", "sufaceDestroyed---------camera release");
 }

 

posted @ 2013-07-02 19:12  jlins  阅读(3394)  评论(1编辑  收藏  举报