title: "id cannot be resolved or is not a field" error?
body: <p>I keep getting this error. Should I just make <code>id</code> a field?</p>
  
  <p>My code is:</p>
  
  <pre><code>public void onCreate(Bundle icicle) 
  {
      super.onCreate(icicle);
      setContentView(R.layout.main);
      ImageView mainimage = (ImageView) findViewById(R.id.mainanim);
      mainimage.setBackgroundResource(R.anim.mainanim);
      mainanimation = (AnimationDrawable) mainimage.getBackground();
  }
  </code></pre>
  
  <p>How exactly do you fix this?</p>