Sound Recorder Getting Error
<p>I am trying to build a sound recorder android application. I have initialized almost everything. Even my code is okay in my previous project file, but now in a fresh project file it is showing error. </p>

<pre><code>@Override
public void onCreate(Bundle savedInstanceState){

    super.onCreate(savedInstanceState);
    setContentView(R.layout.recorder_layout);

    initContent();
    initRecorder();

    recordControl.setText("Start Recording");

    recordControl.setOnClickListener(this);
    play.setOnClickListener(this);
    pause.setOnClickListener(this);
    stop.setOnClickListener(this);
    mySeekBar.setOnSeekBarChangeListener(this);
}

private void initRecorder() {
    // TODO Auto-generated method stub
    int bufferSize = AudioRecord.getMinBufferSize(8000, AudioFormat.CHANNEL_IN_MONO, 
            AudioFormat.ENCODING_PCM_16BIT);

    Buffer = new short[bufferSize];

    soundRecorder = new AudioRecord(MediaRecorder.AudioSource.MIC, SamplingRate, 
            AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT, bufferSize);

}

private void initContent() {
    // TODO Auto-generated method stub
    progressIndicator = (ProgressBar) findViewById(R.id.progressBar);
    recordControl = (Button) findViewById(R.id.recordingControlButton);
    play = (ImageButton)findViewById(R.id.play_img_button);
    pause = (ImageButton)findViewById(R.id.pause_img_button);
    stop = (ImageButton)findViewById(R.id.stop_img_button);
    myChronometer= (Chronometer)findViewById(R.id.progressTimer);
    mySeekBar = (SeekBar)findViewById(R.id.skBar);
    totalDurationLabel = (TextView)findViewById(R.id.totalDuration);
    currentDurationLabel = (TextView)findViewById(R.id.currentDuration);
    mHandler = new Handler();
    utils = new Utilities();
    play.setEnabled(false);
    pause.setEnabled(false);
    stop.setEnabled(false);

}

@Override
public void onClick(View view) {
    // TODO Auto-generated method stub
    if(view == recordControl)
        {
            if (!IsRecording)

                {

                    if(player!= null) player.release();
                    recordControl.setText("Stop Recording");
                    soundRecorder.startRecording();
                    mySeekBar.setProgress(0);
                    myChronometer.setBase(SystemClock.elapsedRealtime());
                    myChronometer.start();
                    recordingFile = getFile("raw");
                    startBufferedWrite(recordingFile);

                }
    }
}
</code></pre>
