Note that there are some explanatory texts on larger screens.

plurals
  1. POR Cannot be resolved to a variable.
    text
    copied!<p>I am trying to run an simple android project from a tutorial, However I am receiving the popular "R cannot be resolved to a variable" error. I have checked my gen folder and the R.id file is not there. This is the list of things I have tried so far:</p> <ol> <li>have done a clean build several billion times.</li> <li>fixed the project properties</li> <li>There are no errors in my .xml files and they do not contain uppercase letters etc.</li> <li>The package name in the source and manifest are exactly the same.</li> <li>Have installed the latest SDK updates + restarted eclipse.</li> <li>have deleted the gen file and done another clean build.</li> </ol> <p>There is only an error in the source files, according to eclipse.</p> <p>Here is a themes.xml file that may be causing a problem:</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;resources&gt; &lt;!-- the theme applied to the application or activity --&gt; &lt;style name="CustomActionBarTheme" parent="@android:style/Theme.Holo"&gt; &lt;item name="android:actionBarStyle"&gt;@style/MyActionBar&lt;/item&gt; &lt;item name="android:actionBarTabTextStyle"&gt;@style/MyActionBarTabText&lt;/item&gt; &lt;item name="android:actionMenuTextColor"&gt;@+color/actionbar_text&lt;/item&gt; &lt;/style&gt; &lt;!-- ActionBar styles --&gt; &lt;style name="MyActionBar" parent="@android:style/Widget.Holo.ActionBar"&gt; &lt;item name="android:titleTextStyle"&gt;@style/MyActionBarTitleText&lt;/item&gt; &lt;/style&gt; &lt;!-- ActionBar title text --&gt; &lt;style name="MyActionBarTitleText" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title"&gt; &lt;item name="android:textColor"&gt;@color/actionbar_text&lt;/item&gt; &lt;/style&gt; &lt;!-- ActionBar tabs text styles --&gt; &lt;style name="MyActionBarTabText" parent="@android:style/Widget.Holo.ActionBar.TabText"&gt; &lt;item name="android:textColor"&gt;@color/actionbar_text&lt;/item&gt; &lt;/style&gt; &lt;/resources&gt; </code></pre> <p>Apologies in advance if this sounds familiar, but I have tried everything I have seen from previous posts.</p> <p>Happy to provide more details if needed. Thanks in advance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload