title: Why does the start() method of MediaRecorder throw an IllegalStateException?
body: <p>I am trying to record audio but the <code>start()</code> method of <code>MediaRecorder</code> class throws an <code>IllegalStateException</code>.
  I use the following code:</p>
  
  <pre><code>MediaRecorder recorder = new MediaRecorder();
  recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
  recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
  recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
  recorder.setOutputFile("/sdcard/");
  try {
      recorder.prepare();
  } catch (IllegalStateException e) {
  
  // TODO Auto-generated catch block
      e.printStackTrace();
  } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
  }
  Log.i("Try","Exception");
  recorder.start(); 
  </code></pre>
  
  <p>And following permission</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.RECORD_AUDIO" /&gt;
  </code></pre>