您的位置:首页 > 移动开发 > Android开发

Android Studio Package rename and error “Activity class does not exist”

2014-11-28 10:47 495 查看
最近被一个问题困扰很久:

When using Android Studio, it gives me this error when I changed the package name

from “org.company.old” to “org.company.new”:

Android studio still shows message like:remote path: /data/local/tmp/org.company.old

原因:

The error was in IntelliJ IDEA after all. When you create a project, the Configuration checks Launch feature automatically and prints the name of default class.

When you change the name of package, refactoring does not change the configuration string which still points to the old class name.

That is why there was not compile-time error, but runtime error.

It would be great if they could fix this issue in this awesome IDE as these kind of errors are very hard to track down (this one took 4 months to realize where the error was).



最后找到的解决方法
It is a bug in Android Studio. To fix it

1.Close Studio.

2.Remove .idea/workspace.xml

3.Launch Studio.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐