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.
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.
相关文章推荐
- 遇到问题----Android----ActivityManager: Error: Activity class {xx/xx.MainActivity} does not exist
- Android中的ActivityManager: Error: Activity class {XXX} does not exist的问题解决
- Android错误之-- ActivityManager: Error: Activity class.....does not exist.
- android studio运行项目,Error: Activity class {package_name/package_name.MainActivity} does not exist
- 遇到问题----Android----ActivityManager: Error: Activity class {xx/xx.MainActivity} does not exist
- react-native run-android Starting: Intent Error type 3 Error: Activity class does not exist
- Android Studio compile error : enum constant INSTANT_RUN_REPLACEMENT does not exist in class
- Error type 3 activity class{}does not exist 找不到文件
- [模拟器问题] 关于ActivityManager: Error: Activity class {..} does not exist. 的解决
- 解决错误 Error type 3: Activity Class {…} does not exist
- [模拟器问题] 关于ActivityManager: Error: Activity class {..} does not exist. 的解决
- 安装并运行apk时出现恼人的"Error: Activity class {xxx/xxx.MainActivity} does not exist."
- Error: Activity class {package1/package2.mainActivity} does not exist.
- Android---关于Activity class {package/class} does not exist
- Error: Activity class {XXX} does not exist的问题解决
- ActivityManager: Error: Activity class { 。。。} does not exist.
- 关于ActivityManager: Error: Activity class {..} does not exist
- 关于ActivityManager: Error: Activity class {..} does not exist
- Android中ActivityManager: Error: Activity class {XXX} does not exist的问题
- Error:The SDK directory 'D:\Program Files\Android\android-studio\sdk' does not exist.