title: The method setOnClickListener(new View.OnClickListener(){}) is undefined for the type imageButton1
body: <p>I  keep getting this error message and I am not sure what I am supposed to do.</p>
  
  <p>The method <code>setOnClickListener(new View.OnClickListener(){})</code> is undefined for the type <code>imageButton1</code></p>
  
  <pre><code>  public void onCreate(Bundle savedInstanceState)
    {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);    
  
      imageButton1 imagebutton1 = (imageButton1) findViewById(R.id.imageButton1);
  
      imageButton1.setOnClickListener(new OnClickListener()
      {
        public void onClick(View v)
        {
           ImageView iv = (ImageView) findViewById(R.id.imageview1);
           iv.setVisibility(View.VISIBLE);
        }
      });
  </code></pre>