![]() | Section 3.8: Settings cannot be resolved |
|
25 Jan 2013, 20:20
Miller Ridgeway (13 posts) |
Hi, I am a bit new to Android programming, so I am looking for some advice. The problem is, I am on section 3.8 in creating the settings menu, I have all but one error worked out. In my eclipse, it says “settings cannot be resolved or is not a field”. I know this means it cannot locate settings, but I don’t know why. My code is as follows
It gives me an error on the case R.id.settings. My settings file is as follows <?xml version=”1.0” encoding=”utf-8”?> |
|
26 Jan 2013, 11:35
Gerry Miller (2 posts) |
Is this a run time error? If so have you tried looking in the log – see section 3.10 (Debugging) Also have you use @Override before your method definition? |
|
26 Jan 2013, 17:37
Anthony Shaw (115 posts) |
Miller, I think you may have either missed out or mis-typed the menu.xml from section 3.7, in particular the line item android:id=”@+id/settings” I think the above line is what generates R.id.settings |
|
28 Jan 2013, 19:59
Miller Ridgeway (13 posts) |
Thanks Anthony! I figured this problem out promptly after I posted this, but did not have access to internet. Regardless, thank you for your response. |
|
28 Jan 2013, 20:21
Anthony Shaw (115 posts) |
No problem, glad you’re moving forward again. |
| You must be logged in to comment |

