sandalone sandalone - 6 months ago 18
Android Question

How do I rename the android package name?

Pressing Shift+F6 seems to rename the last directory only. For example, in the project com.example.test it will offer to rename test only. The same applies if I navigate to package name in .java or Manifest file and press Shift+F6.

Answer

You can do this:

  1. Change the package name manually in the manifest file.
  2. Click on your R.java class and the press F6 (Refactor->Move...). It will allow you to move the class to another package, and all references to that class will be updated.
Comments