//videoFileName = "video" + System.currentTimeMillis() + ".mp4";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.CHINA);
String date = sdf.format(System.currentTimeMillis());
videoFileName = date + "" + "10174" + ".mp4";
崩溃信息:
java.lang.RuntimeException: startPreview failed
at android.hardware.Camera.startPreview(Native Method)
at com.iqizu.user.camera.CameraInterface.doStartPreview(CameraInterface.java:400)
at com.iqizu.user.camera.state.BorrowVideoState.start(BorrowVideoState.java:28)
at com.iqizu.user.camera.state.CameraMachine.start(CameraMachine.java:72)
at com.iqizu.user.camera.JCameraView.confirmState(JCameraView.java:456)
at com.iqizu.user.camera.state.BorrowVideoState.confirm(BorrowVideoState.java:76)
at com.iqizu.user.camera.state.CameraMachine.confirm(CameraMachine.java:117)
at com.iqizu.user.camera.JCameraView$4.confirm(JCameraView.java:239)
at com.iqizu.user.camera.CaptureLayout$4.onClick(CaptureLayout.java:222)
at android.view.View.performClick(View.java:6329)
at android.view.View$PerformClick.run(View.java:25002)
at android.os.Handler.handleCallback(Handler.java:809)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:166)
崩溃代码:
//videoFileName = "video" + System.currentTimeMillis() + ".mp4"; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.CHINA); String date = sdf.format(System.currentTimeMillis()); videoFileName = date + "" + "10174" + ".mp4";
崩溃信息:
java.lang.RuntimeException: startPreview failed at android.hardware.Camera.startPreview(Native Method) at com.iqizu.user.camera.CameraInterface.doStartPreview(CameraInterface.java:400) at com.iqizu.user.camera.state.BorrowVideoState.start(BorrowVideoState.java:28) at com.iqizu.user.camera.state.CameraMachine.start(CameraMachine.java:72) at com.iqizu.user.camera.JCameraView.confirmState(JCameraView.java:456) at com.iqizu.user.camera.state.BorrowVideoState.confirm(BorrowVideoState.java:76) at com.iqizu.user.camera.state.CameraMachine.confirm(CameraMachine.java:117) at com.iqizu.user.camera.JCameraView$4.confirm(JCameraView.java:239) at com.iqizu.user.camera.CaptureLayout$4.onClick(CaptureLayout.java:222) at android.view.View.performClick(View.java:6329) at android.view.View$PerformClick.run(View.java:25002) at android.os.Handler.handleCallback(Handler.java:809) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:166)