An unexpected exception occurred while creating a change object. see the error log for more details

今天再给Android项目工程中的包重命名时出现了这个错误(之前重命名的时候就没有出现,郁闷):

An unexpected exception occurred while creating a change object. see the error log for more details

效果如下图所示:

 

171621250024

 

 

之后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

转载于:https://www.cnblogs.com/hsx514/p/3850552.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值