1

In manifest I put android:sharedUserId="xxxx.xxxx.xxxx" and android:sharedUserLabel="@string/shared_user_label"

<manifest package="com.xxxx.xxxx"
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:installLocation="internalOnly"
      android:sharedUserId="xxxx.xxxx.xxxx"
      android:sharedUserLabel="@string/shared_user_label">

In build.gradle I changed versionCode 26 to versionCode 27 and versionName "1.1.14" to versionName "1.1.15"

defaultConfig {
applicationId "xxxx.xxxx.xxxx"
minSdkVersion 15
targetSdkVersion 22
versionCode 27
versionName "1.1.15"}

When I compile and run the app it shows a popup dialog "Application Install failed" with the following message:

Installation failed with message INSTALL_FAILED_UID_CHANGED. It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.

WARNING: Uninstalling will remove the application data!

Do you want to uninstall the existing application?

Is there any way to upgrade the existing application by adding android: sharedUserId without uninstall? If yes, How?

1 Answers1

1

If you want to use android:sharedUserId, Android system will not allow to upgrade app, since UID got changed

alternate option is to use contentProviders to share the data between apps

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140