When two or more developers work in a team, they can't overwrite the installed APK if it is generated by the other developers. This is the exact scenario:
Can anyone tell why this error occurs is there any laptop level dependency is there?
This happens because the app you are building on Android is being signed with a specific keystore that is generated on your local machine. So when developer 1 signs the app with his keystore, it gets his fingerprint and you can install it fine. But when developer 2 builds the app with his (different) keystore, it gets a different fingerprint. Therefore Android won't let you overwrite the app that was already installed. The solution would be to share the debug keystore so the fingerprints of all APK's will align.
The keystore can be found in ~/.android/debug.keystore
.
You can verify the fingerprint of your APK's with the following command: keytool -printcert -jarfile app.apk
, or keytool -printcert -jarfile app.aab
in case you output an aab.
Before generating debug APK, Android Studio automatically signs your app with a debug certificate generated by the Android SDK tools. So both the APKs are signed with different keys.
You can read more here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.