Package rename and error "Activity class does not exist"

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.

File -> Invalidate caches/Restart may fix this type of errors