Error type 3 Error: Activity class {} does not exist

The Solution to Error type 3 Error: Activity class {} does not exist is

I faced a similar problem after refactoring.
This is what i did to resolve this issue:

  1. Cleaned the Project
  2. Deleted the Build directory
  3. Restarted Android Studio
  4. Rebuild the Project
  5. Run
  6. Optionally (Go to the files menu on android, click on "Invalidate Caches / Restart..." uninstall the app on your phone and try again)

And everything worked fine!
I think the key is to restart your IDE.

Hope this helps you or anyone else!

Edit 1:
If the above steps don't work for you, then deleting Gradle cache seems to be a solution, as pointed out by @Yasitha.

Edit 2
As suggested by a couple of users in the comments below, sometimes the issue can be resolved by completely removing and reinstalling the app from your device.
Simply type adb uninstall <package> in terminal to completely remove app from the device.

Edit 3
As mentioned in Abhishek's Answer, one should also try deleting the app from your device in case multiple users are set up on your device.
Simply go to Mobile Settings > Apps > [Your App] > More > Uninstall App for All Users

UPDATE for Android Studio 2.1 and up

When running Android Studio 2.1 and up you can also encounter this issue when you have the instant run option enabled in your preferences (is enabled by default).

To disable this option go to the Preferences option in the Android Studio top menu and look for Instant Run so you can uncheck the first checkbox on that screen.

Disable Instant Run in Android Studio 2.1+

Anyway that fixed it for me. Originally pointed out by user @yusufonder. I discovered this was the issue since gradle install still worked.

~ Answered on 2014-06-16 10:32:58

Most Viewed Questions: