So I recently (like today recently) began to try to work in eclipse. I\'ve been following android developers beginners course, and everything went fine until this point. I\'ve g
Yes,it is that: Settings,you can use Settings instead of something here.the error often happened that you deleted the statement in the strings.xml carelessly. I also got the same thing and solved until I have seen the hint.Thank you very much Kiirani and bigmike
add this to your res/values/strings.xml
<string name="action_search">Search</string>
I have the same error but I noticed that in res/values/strings.xml the tag is not start with "<"
maybe you have the same mistake
?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">android app</string>
<string name="action_settings">Settings</string>
</resources>
my advise is make your project from the scratch
This error means a reference is being made about a recource that has yet to be defined. If you keep going with the tutorial, they actually say you will see this error! So keep going and you will learn how to fix it in the sections following.
ha - I am doing the tutorial and got the same thing. You copied/pasted the entire strings.xml
file, but this file is missing a value that the app needs. It's a bug in their tutorial.
Add this line back to strings.xml:
<string name="action_settings">something here</string>
Where I put "something here" I can't remember what the original text was.
The problem is that main.xml (under res/menu), which of course we didn't touch in the tutorial, references the string "action_settings". This was deleted when you copied / pasted the entire string.xml from their example.
SOLVED:
add ..\res\values\strings.xml
<string name="action_settings">Action Settings</string>
And Update ..\src\com\example\helloworld\MainActivity.java Line 18 with follows
getMenuInflater().inflate(R.menu.main, menu);
it worked for me.
thanks