Issues with


In the file I cannot fix the error: “crime_title cannot be resolved or is not a field”

View v = inflater.inflate(R.layout.fragment_crime, parent, false); mTitleField = (EditText)v.findViewById(;

it look like the crime_title field id is missing.
This is the code on the fragment_crime.xml layout with the crime_title id

[code]<?xml version="1.0" encoding="utf-8"?>

<EditText android:id="@+id/crime_title"


Any help is appreciated thanks.


This issue is addressed in the earlier post “Crime.xml auto-created in /res/menu”. Look there for details.

Quick Answer: Delete “Crime.xml” from res/menu. It’s preventing from regenerating, and in turn “” from existing.


Although I’ve deleted the crime.xml … I continue to have the same errors on the fragment_crime and the crime_title (fragment_crime is not a field or cannot be resolved). I suspect that my did not rebuild… but I do not know how to make that happen.


I also have been struggling with the same, and deleted menu/crimes, and still no go. Then I deleted the import “android.R” , and it now works. i followed the advice at this post over in the general category:

“Eclipse not recognizing R generated ints”


A hint that helped me from Stack Overflow was that the regeneration of the R file would not happen until all syntax errors were removed from the project. (besides the one caused by the R file not regenerating)