title: Android player raising exception prepare failed:status 0x1
body: <p>I am trying to play audio file from res/raw folder.<br>
  but getting the error<br>
  <strong><em>prepare failed: status = 0x1</em></strong></p>
  
  <p>My code: </p>
  
  <pre><code>package com.example.lvm;
  
  import java.io.IOException;
  
  import android.media.MediaPlayer;
  import android.media.MediaPlayer.OnCompletionListener;
  import android.os.Bundle;
  import android.app.Activity;
  import android.view.Menu;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.widget.Button;
  import android.widget.Toast;
  
  public class MainActivity extends Activity {
  Button introAudio;
          @Override
          protected void onCreate(Bundle savedInstanceState) {
                  super.onCreate(savedInstanceState);
                  setContentView(R.layout.activity_main);
                  introAudio=(Button)findViewById(R.id.introAudio);
                  introAudio.setOnClickListener(new OnClickListener() {
  
                          @Override
                          public void onClick(View arg0) {
                                  MediaPlayer mp = new MediaPlayer();
                                  String name = "greeting";
                                   mp.setOnCompletionListener(new OnCompletionListener() {
  
                                          @Override
                                          public void onCompletion(MediaPlayer mp) {
                                              mp.release();
                                          }
  
                                      });
  
                                  try {
                                       mp.setDataSource("android.resource://com.example.lvm/raw/"+name);
                                           mp.prepare();
                                           mp.start();
                                  } catch (Exception e) {
                                           Toast.makeText(MainActivity.this, e.getMessage(), Toast.LENGTH_LONG).show();
                                  }
                          }
                  });
          }
  
          @Override
          public boolean onCreateOptionsMenu(Menu menu) {
                  // Inflate the menu; this adds items to the action bar if it is present.
                  getMenuInflater().inflate(R.menu.activity_main, menu);
                  return true;
          }
  
  }
  </code></pre>