Rename Android Package Name - SOLVED!

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)

 

That's It!