"question_oceans cannot be resolved or is not a field"


#1

Hi. I’m South Korean student and I’m totally new to this android stuff. I’ve been following the book but I have problem adding mQuestionBank array. (list 2.6) All five elements of the array pops error like “It can’t be resolved or is not in a field.” So I checked the R.java, and I found out there wasn’t ‘question_asia’ and those stuffs in string class of R.java. I guess this is where the problem comes but… why are those questions did not automatically added to R.java? Aren’t they supposed to? or did I miss something?


#2

You need to make sure the questions are all in the strings.xml resource file. If the questions are in the strings.xml file, then their resource id will automatically generate in R.java.
Play me in starcraft.
-SakibiHabibi