title: R cannot be resolved to a variable on newly installed eclipse
body: <p>I have been looking for this on stack overflow for the past two hours and have tried a lot of things but nothing worked.</p>
  
  <p>I have installed eclipse juno just this morning and i am getting this error <code>R cannot be resolved to a variable</code> in any project that I create. Also, I cannot see any files under the gen folder, even after I build the project. I have tried clean project, installed <code>ia32 libs</code> for my 64 bit system running ubuntu, tried changing folder positions, rebooting system but nothing worked.</p>
  
  <p>The generated code is:</p>
  
  <pre><code>package tanvi.alarm;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.view.Menu;
  
  public class MainActivity extends Activity {
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          getMenuInflater().inflate(R.menu.main, menu);
          return true;
      }
  
  
  }
  </code></pre>
  
  <p>main.xml:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerHorizontal="true"
          android:layout_centerVertical="true"
          android:text="@string/hello_world"
          tools:context=".MainActivity" /&gt;
  
      &lt;Button
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/hello_world"
          /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>manifest:</p>
  
  <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="tanvi.alarm"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="8"
          android:targetSdkVersion="15" /&gt;
  
      &lt;application
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
              android:name=".MainActivity"
              android:label="@string/title_activity_main" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>