title: Fixing Error in styles.xml to generate R.java : No resource found name 'Theme.AppCompat.Light'
body: <p>I am new to Android and am trying to run my first program. However, based on my searches across the internet, I think that I can't import <code>mypackage.R</code> because <code>r.java</code> has not been generated because of errors in my style.xml files. I have searched around trying to figure out how to fix these but I can't find a fix that works. The error in <code>styles.xml</code> is </p>
  
  <pre><code>error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'
  </code></pre>
  
  <p>Does anyone know how to fix this?</p>
  
  <p>![Errors in style.txt][1]</p>
  
  <p>Here is the code I am using:</p>
  
  <pre><code>package com.example.test;
  
  import android.os.Bundle;
  import android.app.Activity;
  import android.view.Menu;
  import android.view.MenuItem;
  
  public class MainActivity extends Activity {
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  }
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      getMenuInflater().inflate(R.menu.activity_main, menu);
      return true;
  }
  }
  </code></pre>
  
  <p>UPDATE:
  Here is styles.xml:</p>
  
  <pre><code>&lt;resources&gt;
  
  &lt;!--
      Base application theme, dependent on API level. This theme is replaced
      by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
  --&gt;
  &lt;style name="AppBaseTheme" parent="Theme.AppCompat.Light"&gt;
      &lt;!--
          Theme customizations available in newer API levels can go in
          res/values-vXX/styles.xml, while customizations related to
          backward-compatibility can go here.
      --&gt;
  &lt;/style&gt;
  
  &lt;!-- Application theme. --&gt;
  &lt;style name="AppTheme" parent="AppBaseTheme"&gt;
      &lt;!-- All customizations that are NOT specific to a particular API-level can go here. --&gt;
  &lt;/style&gt;
  
  &lt;/resources&gt;
  </code></pre>
  
  <p>UPDATE 2:
  Here is AndroidManifest.xml</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.test"
  android:versionCode="1"
  android:versionName="1.0" &gt;
  
  &lt;uses-sdk
      android:minSdkVersion="8"
      android:targetSdkVersion="19" /&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.test.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>