title: How to Play sound when button is clicked in Android?
body: <p>I'm trying to play a sound file when a button is clicked but keeps getting an error.</p>
  
  <p>The error is:</p>
  
  <pre><code> "The method create(Context, int) in the type MediaPlayer is not applicable for the arguments (new View.OnClickListener(){}, int)"
  </code></pre>
  
  <p>Here's my code:</p>
  
  <pre><code>@Override
  public void onClick(View v) {
      // TODO Auto-generated method stub
      Button zero = (Button)this.findViewById(R.id.btnZero);
      zero.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
              mp = MediaPlayer.create(this, R.raw.mamacita_zero);
          }
      });
  }
  </code></pre>
  
  <p>Any help or tips would be appreciated.
  Thnx!</p>