title: OnClickListener cannot be resolved to a type (Eclipse)
body: <p>Hello im new to programming, im trying to construct my first simple application, im looking to play a short soundclip on the push of an ImageButton.</p>
  
  <p>while typing out my code i get an error with the statement;</p>
  
  <pre><code> Button.setOnClickListener(new OnClickListener() {
  </code></pre>
  
  <p>The on click listener is underlined and when i go to the error eclipse tells me that OnClickListener cannot be resolved to a type.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>import android.app.Activity;
  import android.os.Bundle;
  import android.view.view;
  import android.view.view.OnClickListener;
  import android.widget.Button;
  import android.widget.ImageButton;
  
  public class main extends Activity {
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
  final ImageButton Button = (ImageButton) findViewById(R.id.imageButton1);
  Button.setOnClickListener(new OnClickListener() {
      public void onClick(View v) {
          // Perform action on clicks
  
      }
  });
  </code></pre>
  
  <p>I read a suggestion that said to add;</p>
  
  <pre><code>import android.view.view;
  </code></pre>
  
  <p>aswell as</p>
  
  <pre><code>import android.view.view.OnClickListener;
  </code></pre>
  
  <p>These import statements are also highlighted.
  Could these errors be caused by how eclipse is set up on my computer?</p>
  
  <p>Any help would be greatly appreciated</p>