'App not installed after trying to install the new version from bitbucket pipelines

The scenario: I have installed the apk in my physical device. I build a new version of the apk on bitbucket with the pipelines. I download the apk after a successful build and try to install to the same physical device. I get App not install. (if i delete the old version then the new one can be installed)

I read somewhere that i need to change the versionCode and versionName to the build.gradle, which I did but the same thing happened.

Any help is appreciated!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source