AndroidCamera-TouchToFocusMeteringZoom
AndroidCamera-TouchToFocusMeteringZoom copied to clipboard
频繁startRecording和stopRecording会导致崩溃
Process: com.polarxiong.camerademo, PID: 5430
java.lang.RuntimeException: stop failed.
at android.media.MediaRecorder.stop(Native Method)
at com.polarxiong.camerademo.CameraPreview.stopRecording(CameraPreview.java:84)
at com.polarxiong.camerademo.MainActivity$3.onClick(MainActivity.java:43)
at android.view.View.performClick(View.java:6603)
at android.view.View.performClickInternal(View.java:6576)
at android.view.View.access$3100(View.java:780)
at android.view.View$PerformClick.run(View.java:26090)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6702)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
stop之前设置了setOnErrorListener为null,也避免不了崩溃,请问有其他方法吗?