I'm getting an error about a string array (located in strings.xml) not being able to be resolved.
I've done everything the internet says:
- Restarted Eclipse
- Deleted my R.java file inside the
genfolder - My
valuesfolder is still inside theresfolder, not moved - None of my XML files have erros
- Ran
Project -> Clean - I don't have
android.Rimported in my class. - Checked the
R.javaclass, it indeed doesn't have anapp_categoriesproperty (my array's name)
The relevant part of the XML:
<string-array name="app_categories">
<item >Cat 1</item>
<item >Cat 2</item>
<item >Cat 3</item>
<item >Cat 4</item>
<item >Cat 5</item>
<item >Cat 6</item>
<item >Cat 7</item>
<item >Cat 8</item>
<item >Cat 9</item>
</string-array>
The Java code:
String[] categoryNames = getResources().getStringArray(R.string.app_categories);
All my other strings are visible. I have another array defined just like this one, and that one isn't visible either.
Exact error below:
app_categories cannot be resolved or is not a field [class_name].java [path] line 45 Java Problem