当前位置:编程学习 > JAVA >>

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

主要引起是因為在

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

解決情況:

public void su易做图ceDestroyed(Su易做图ceHolder holder) {
  camera.setPreviewCallback(null) ;
  camera.stopPreview();
  camera.release();
  camera = null;
  Log.e("CameraPreview", "sufaceDestroyed---------camera release");
 }

 

补充:软件开发 , Java ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,