title: Eclipse (Android): Cannot be resolved to a type/variable etc
body: <p>Hey guys after updating Eclipse (<code>Help -&gt; Check for Updates</code>) and Android-SDK-Manager I always get the "…cannot be resolved to a type" or "…cannot be resolved to a variable" message. I get this Error-Message at every single project I already had created as well as on new ones.</p>
  
  <p>I have already tried those things but none of them worked out for me:</p>
  
  <ol>
  <li><code>Project -&gt; Clean...</code></li>
  <li><code>Right click at the project -&gt; Properties -&gt; Java Build Path -&gt; Libraries -&gt; Add Library... -&gt; JRE System Library</code> <a href="https://stackoverflow.com/questions/26171599/my-apps-dont-run-after-update-eclipse-adt">my apps dont run after update eclipse &amp; adt</a></li>
  <li><code>Window -&gt; Preferences -&gt; Java -&gt; Compiler -&gt; Building -&gt; [x] Rebuild class files modified by others</code></li>
  </ol>
  
  <p>All those three steps didn't solve those error messages...maybe someone else has an idea what to do? Reinstall Eclipse should be the last option…it totally toke me forever to connect Eclipse with GitHub :(</p>
  
  <p>Example Code:</p>
  
  <pre><code>package com.example.test;
  
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuItem;
  
  public class MainActivity extends ActionBarActivity {
  
      @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;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          // Handle action bar item clicks here. The action bar will
          // automatically handle clicks on the Home/Up button, so long
          // as you specify a parent activity in AndroidManifest.xml.
          int id = item.getItemId();
          if (id == R.id.action_settings) {
              return true;
          }
          return super.onOptionsItemSelected(item);
      }
  }
  </code></pre>
  
  <p>Error messages:</p>
  
  <pre><code>ActionBarActivity cannot be resolved to a type  MainActivity.java   /TestProject/src/com/example/test   line 7  Java Problem
  ActionBarActivity cannot be resolved to a type  MainActivity.java   /TestProject/src/com/example/test   line 11 Java Problem
  ActionBarActivity cannot be resolved to a type  MainActivity.java   /TestProject/src/com/example/test   line 31 Java Problem
  error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.   styles.xml  /TestProject/res/values-v14 line 8  Android AAPT Problem
  error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. styles.xml  /TestProject/res/values line 7  Android AAPT Problem
  error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. styles.xml  /TestProject/res/values-v11 line 7  Android AAPT Problem
  R cannot be resolved to a variable  MainActivity.java   /TestProject/src/com/example/test   line 12 Java Problem
  R cannot be resolved to a variable  MainActivity.java   /TestProject/src/com/example/test   line 18 Java Problem
  R cannot be resolved to a variable  MainActivity.java   /TestProject/src/com/example/test   line 28 Java Problem
  The method getMenuInflater() is undefined for the type MainActivity MainActivity.java   /TestProject/src/com/example/test   line 18 Java Problem
  The method onCreate(Bundle) of type MainActivity must override or implement a supertype method  MainActivity.java   /TestProject/src/com/example/test   line 10 Java Problem
  The method onCreateOptionsMenu(Menu) of type MainActivity must override or implement a supertype method MainActivity.java   /TestProject/src/com/example/test   line 16 Java Problem
  The method onOptionsItemSelected(MenuItem) of type MainActivity must override or implement a supertype method   MainActivity.java   /TestProject/src/com/example/test   line 23 Java Problem
  </code></pre>