I have updated my android studio from 3.5.x to 3.6 today and getting error while generating signed apk for build variant showing the follow
This may have been overkill but I:
I just delete all debug APKs in myProject\app\build\outputs\apk\debug
directory and it worked for me.
I had similar issue. I have solved it by doing a "Clean Project", then a build.
try clean your build and rebuild it and then run project still did not worked then do following
File->Invalidate Cashes /restart-> Invalidate and restart
you can clean your build by
Build-> Clean project
I did an Invalidate Cache and Restart and it fixed it.
Solved:
Just delete the earlier apk file. That's it.
Location would be: YourProjectFolder/app/debug/