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