I want to make a voice recorder app but it crashes when i click the \"Start Recording\" button. I get an error saying java.lang.IllegalStateException at android.media.Media
`if (audioRecorder != null) {
try {
audioRecorder.stop();
audioRecorder.reset();
audioRecorder.release();
audioRecorder = null;
} catch (IllegalStateException e) {
e.printStackTrace();
}
}`
Because we are not releasing recorder and only stopping the recorder on relaunch we get at android.media.MediaRecorder.start(Native Method) took 1 hrs to figure out