I have recently updated my Android Studio to 3.6.1, thereby also updating gradle plugin to 3.6.1 and the gradle wrapper to 5.6.4
When running the debug build, I keep get
Sometimes it is because of the emulator/device you are installing your apk on. If you have previously installed apk on a device and then uninstalled, then it might still exist on your device. So, in the emulator, go to settings -> Apps, then check for the application in the list. If exist, click on that particular application and then click on 'Uninstall for all users'(Typically from three dots in right corner).
Hope it helps :)