这是我的代码。
try {
if (mMediaRecorder != null) {
try {
mMediaRecorder.prepare();
} catch (IOException e) {
e.printStackTrace();
}
// This line throwing exception
mMediaRecorder.start();
try {
if (mCamera != null)
mCamera.startSmoothZoom(globalZoomValue);
} catch (Exception e1) {
e1.printStackTrace();
}
}
} catch (Exception e) {
// This is thrown if the previous calls are not called with
// the
// proper order
e.printStackTrace();
}
此代码在其他设备上运行良好,但在三星 Galaxy S2 上抛出异常。