问题
I am trying to build a call recorder in android. I am using the MediaRecorder Class:
When My App reaches the following line: recorder.stop() I get the following error:
stop called in an invalid state: 1
What causes that problem?
Thanks in advance,
kobi
回答1:
From the MediaRecorder documents page:
http://developer.android.com/reference/android/media/MediaRecorder.html
Looking at the state diagram given, you can only call stop() when the MediaRecorder is in the state Recording
Hard to tell what you are doing wrong without code, but you have to be in the wrong state to call stop().
来源:https://stackoverflow.com/questions/11852852/stop-called-in-an-invalid-state-1