且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

包重命名和错误“活动类不存在"

更新时间:2022-06-24 03:09:57

毕竟错误出在 IntelliJ IDEA 中.创建项目时,配置会自动检查启动功能并打印默认类的名称.当您更改包的名称时,重构不会更改仍指向旧类名称的配置字符串.这就是为什么没有编译时错误,而是运行时错误的原因.

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.

如果他们能在这个很棒的 IDE 中解决这个问题就太好了,因为这些类型的错误很难追踪(这个错误花了 4 个月的时间才意识到错误在哪里).

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).