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
It's due to updated configuration changes in the gradle.
So just try File -> File > Invalidate Caches / Restart
File -> File > Invalidate Caches / Restart
Or Delete the old APKs in your system