After many, many attempts to rename an Android Package Name and having it fail I finally found a solution.
If you have tried to rename an Android project and came up with all types of errors, or the actual package name did not change, or you had issues with Import statements, or R.JAVA problems, this is the answer.
FOLLOW THESE STEPS
1. Open your AndroidManifest.xml and rename the package here first.
2. Rename the Generated Java Files next. To me this did not make sense since these are generated files in the project, but Android uses the R.java class to compile. Frankly I do not get it, to me it should get generated on the compile, but I had enough of this so I am moving on.
3. Rename the package under src. Right click on the package name and refactor. Check everything, preview, then complete.
4. Rename the project (optional)
In the example below I typed some text and clicked a radio button. Either of these actions would have prompted the warning message to be displayed once leaving the page.
ADDING ATTRIBUTES TO FIELDS
1. On the input fields add onclick (or onchange) attributes to the fields you want to track for any changes.
Sample project attached.
CheckDataEntryChgs.zip (139.98 kb)