今天再给Android项目工程中的包重命名时出现了这个错误(之前重命名的时候就没有出现,郁闷):
An unexpected exception occurred while creating a change object. see the error log for more details
效果如下图所示:
之后google百度各种找,最后在stackoverflow上找到以一个帖子:
http://stackoverflow.com/questions/6465127/rename-android-package-name-fails/15771033#15771033 (注意:这个解决办法不是该贴的被采纳的答案)
解决办法 :
You can not belive this. I have exactly the same problem and is because I comment a class entirely.
So I think that when eclipse try to change the package name of a commented class it throw this error.
To solve the problem you only has to delete the class or uncomment it.
大概的意思就是说,你的项目中的有些类被“全部注释掉了“(整个类中的所有代码都注释掉了,也就是这个类中所有内容都是注释而没有响应的执行代码),找出这些类,并删除他们。我尝试这做了一下,删除之后确实能够重命名了。
博主遇到了同样的问题 困扰了很久,今天看到这篇文章解决了问题,特意转载过来,仅供学习。
原文链接 : http://www.cnblogs.com/tony-yang-flutter/p/3524256.html