title: eclipse error with android: id cannot be resolved or is not a field
body: <p>I just started playing around with android development, and already with just an attempt at making a button, I have encountered a problem.
  The error I'm given in the following code is right on "R.id.button1".
  It says id cannot be resolved or is not a field.
  Do I need to manually reference every single object I make in the layout xml file? I found that this did work, but it does seem to be a bit much for every button I want to make...</p>
  
  <pre><code>package com.example.helloandroid;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.widget.Button;
  
  
  public class HelloAndroid extends Activity {
      /** Called when the activity is first created. */
  
   private Button button1;
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          button1 = (Button)findViewById(R.id.button1);
          button1.setOnClickListener(new OnClickListener()
          {
           public void onClick(View v)
           {
            finish();          
           }        
          });
      }
  }
  </code></pre>