I used Android Studio 3.5.3 to execute(install) an application on a Sony cellphone and it kept displayed Error Type 3 : xxxx.xxx.xxx.MainActivity does not exist.
After Googled a few document, here’s what solved this problem.
Just adb unstall the package name (as example)
$ cd /Users/username/Library/Android/sdk/platform-tools
$ ./adb uninstall com.example.yourapp