Activity class does not exist (Error type 3)

On some devices (LG Stylus 3 Android 7.0) when you press and move app from desktop to trash can the app does not removed from device. You can restore app trashed by this way later without reinstalling it from Google Play. If it is your case you may see this error:

Error while executing: am start -n "ru.alanov.cashbox/ru.alanov.cashbox.activity.LoginActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.your.app/.activity.MainActivity }
Error type 3
Error: Activity class {ru.alanov.cashbox/com.your.app.activity.MainActivity} does not exist.

Error while Launching activity

when trying to reinstall app from Android Studio thru ADB. Go to Settings -> Applications -> Click on your app and delete it. After it error disappears.


If you are getting this error, it may be because the app that you are trying to load is still installed for another user account on the same device.

In other words, uninstalling an app for the current user account does not necessarily uninstall the same app for all other user accounts on the device.

If you go into Settings => App and look for the device in question, you will see that it may still be there. If that is the case, Tap on the app to show the App Info screen and goto the "..." overflow menu on the upper right hand side. Tap that and there should be an option to uninstall the app for all users.

Once you have uninstalled the app for all users, this error should go away and you should be able to load and run the app.


I have the same issue with my project. I resolve it by navigating to file and clicking on Invalidate Caches/Restart.