Thanks, that did it! Didn't know about those getting inlined as bytecode. Learned something new today.
Thanks again, Simon On Nov 1, 5:17 pm, Mark Murphy <[email protected]> wrote: > Do Project > Clean from the Eclipse main menu, or ant clean from the > command line. The R values get inlined as bytecode in your classes, > and sometimes the compiled classes get out of sync with resource > changes in R. > > > > > > > > > > On Tue, Nov 1, 2011 at 5:00 PM, Simon <[email protected]> wrote: > > Hi, > > > I have some really strange behaviour going on related to using > > MenuInflater. I have the following code in my Avtivity: > > > @Override > > public boolean onCreateOptionsMenu(Menu menu) { > > MenuInflater inflater = getMenuInflater(); > > inflater.inflate(R.menu.menu_1, menu); > > return true; > > } > > > But when I call it, I get a different menu returned (ie, menu_2). It > > seems like all the R.menu.* entries are pointing to the wrong XML > > files in my res/menu directory. I have tried deleting the R.java file > > to force it to be regenerated (even though I think it is every time > > the workspace is built), removing all user data from the virtual > > device run through the emulator. The content of res/menu/menu_1.xml > > is what I expect it to be, and not what is being loaded. All my > > options and context menus are now loading the incorrect menus, even > > though they had been working before. > > > Has anybody else ever run across this issue, or have any ideas for > > what I could try to fix it? > > > Thanks, > > > Simon > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Android App Developer Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

