android mediaRecorder.setAudioSource failed
I have android G1 firmware 1.6, I am trying to record voice from the app with the follow code. MediaRecorder recorder = new MediaRecorder(); recorder.setAudioSource(MediaRecorder.AudioSource.MIC); recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); recorder.setOutputFile(PATH_NAME); recorder.prepare(); recorder.start(); my manifest.xml has: <uses-permission android:name="android.permission.RECORD_AUDIO" /> I got: 09-23 14:41:05.531: ERROR/AndroidRuntime(1718): Uncaught handler: thread main exiting due to uncaught