Rename application Package generates fatal error "Fatal error occurred while performing refactoring"

StackOverflow https://stackoverflow.com/questions/23601773

質問

I am trying to rename my android application package in eclipse via Android Tools > Rename Application Package. It is generating error saying

A Fatal error occurred while performing the refactoring

You can see the screen shot below. Error msg dialog

I can't rename my package.

役に立ちましたか?

解決

I have found the reason behind the error.
One of my class was commented completely(package was commented too).
Whenever Eclipse tries to rename Application package it throws fatal error because the file exists in the package without package name in it.
I just added the package name on the top of the class and tried renaming it again, no issue was found and Application package was renamed properly.

他のヒント

Do it Manually 1) go to Manifest.xml file and change pakage name and 2) go to src directory and change package name then clean proj and rebuild thats it.

I face similar issue and fixed it by explicitly enabling "update references" in the rename dialog box. This is disabled by default.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top