From the [Android Getting Started][1] tutorial I'm trying to build my first app. This however, is quite a process. I was at the point "Add the Actions to the Action Bar" on [this page][2] when I encountered the error *main_activity_actions cannot be resolved or is not a field* for this line:
inflater.inflate(R.menu.main_activity_actions, menu);
So I found a similar post here on SO, which suggests to remove import android.R; and then do Project -> Clean and rebuild. Since I didn't have the import android.R; in it I simply tried to add it, do a Clean and rebuild, but this leaves me with even more errors. So I removed the import android.R; again and did a Clean and Rebuild again, but now it still gives me all those new errors, saying: R cannot be resolved to a variable for the following lines (these lines do not appear close to eachother, but throughout the file):
setContentView(R.layout.activity_main);
inflater.inflate(R.menu.main_activity_actions, menu);
EditText editText = (EditText) findViewById(R.id.edit_message);
For reference, the total file is here on pastebin.
Can anybody please help me out here? What am I doing wrong and how can I solve this?
[EDIT] Below the code in my res/menu/main_activity_actions.xml. If you need to see any more code let me know!
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Search, should appear as action button -->
<item android:id="@+id/action_search"
android:icon="@drawable/ic_action_search"
android:title="@string/action_search"
android:showAsAction="ifRoom" />
<!-- Settings, should always be in the overflow -->
<item android:id="@+id/action_settings"
android:title="@string/action_settings"
android:showAsAction="never" />
<!-- Add some other thing, just cuz I can.. -->
<item android:id="@+id/action_something_else"
android:title="@string/action_something_else"
android:showAsAction="never" />
</menu>