android - "refresh_tasks cannot be resolved or is not a field" -


I basically copy & amp; Pasted the code from the top and changed the required readings, yet I get this error I am trying to create a "refresh" item in my menu.

XML code:

  & lt; Menu xmlns: android = "http://schemas.android .com / apk / res / android" & gt; & Lt; Item android: id = "@ + id / action_settings" Android: orderInCategory = "100" Android: showAsAction = "never" android: title = "@ string / action_settings" /> & Lt; Android Android: id = "@ + id / refresh_tasks" Android: title = "@ string / refresh" /> & Lt; / Menu & gt;   

HomeActivity.Java Code:

  Public Boolean Option Option (menu item) {switch (item.get ITMID)} {Case R. Id. Refresh_task: // line where I get error loading TasksFromAPI (TASKS_URL); Back true; Default: Return Super.Options item selected (item); }}   

I searched the Internet, but I have not succeeded in fixing it. I think that something is wrong in my XML, but I do not know what it can be.

So, apparently my R.Java stopped updating for some reason. My code was correct, but it will not be updated to edit the AndroidManifest.xml file and then save it to RJJA to update. Before you save it, your Android Manifest.exml file is so easy to add space and then to delete the place (though, you can leave the space if you want ... this should not be the cause of any error) .

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -