I am updating a version of an app, both apps have same package id.
My testing:
App version 2 goes through installation having version 1 already installed on android 4.4 and 5. No problems occur.
App version 2 goes through installation having version 1 already installed on Android version 6 and above. It tells me installation fails. The installation can complete if version 1 is uninstalled first.
I'm guessing there is some system setting to allow old apps be overwritten by updated apps with same package name for Android 6 and above?