Error from import android.R or from layout.main?
<p>I keep either removing import.R or adding mypackage.R or deleting all imports and shift-control O
or deleting R.java.</p>

<p>I still get the error: main.xml cannot be resolved or alternately, R cannot be resolved to a variable. I have cleaned each time. How do you get this to work?</p>

<pre><code>   package com.hga;

   import android.app.Activity;
   import android.content.Intent;
   import android.view.Menu;
   import android.view.View;
   import android.widget.Button;

   public class Hga extends Activity {

   @Override
   protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView( R.layout.activity_hga );
</code></pre>
