title: java: R cannot be resolved to a variable
body: <p>I know this question has been asked before but I am at my witts end with this. I have just created a new project and getting this error.</p>
  
  <p>Ofcourse the R.java file is not being generated.</p>
  
  <p>I am using JRE7 android 4.2.2</p>
  
  <pre><code>    package com.example.myfirstapp;
  
  import android.os.Bundle;
  import android.app.Activity;
  import android.view.Menu;
  
  public class MainActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.main, menu);
          return true;
      }
  
  }
  </code></pre>
  
  <p>As we can see no R import in the mainactivity class</p>
  
  <p>Lets take a look at the untouched manifest file:</p>
  
  <pre><code>   &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.myfirstapp"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="8"
          android:targetSdkVersion="17" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
              android:name="com.example.myfirstapp.MainActivity"
              android:label="@string/app_name" &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>
  
  <p>nothing there that looks out of place. I have tried multiple close project open project. clean and builds. </p>
  
  <p>None of the res are in uppercase and I have experimented with the project properties java build path order and export. Under libaries I have 3 different android libaries:</p>
  
  <p>android 4.2.2
  android Private Libaries
  android dependencies </p>
  
  <p>THis is making me start to long for C++ :)</p>