随笔 - 632  文章 - 17  评论 - 54  阅读 - 93万

Android 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

效果如下图所示:

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

大概的意思就是说,你的项目中的有些类被“全部注释掉了“(整个类中的所有代码都注释掉了,也就是这个类中所有内容都是注释而没有响应的执行代码),找出这些类,并删除他们。我尝试这做了一下,删除之后确实能够重命名了。

 

 

 

posted on   飘杨......  阅读(2480)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
阅读排行:
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示