Android INSTALL_FAILED_UID_CHANGED

Solution 1:

Sometimes you have to also uninstall the data folders. For me, I had a package in userspace of com.kikin.cts, and also a folder directory in /data/data/com.kikin.cts. Kept getting INSTALL_FAILED_UID_CHANGED, but after removing the data folder, the error went away.

Solution 2:

For rooted devices:

Run the below command

adb rm -rf /data/data/<your.package.name>

For non-rooted device:

  1. Change the ApplicationId of the app. Refer this link to change ApplicationId.
  2. Build and install the app. App will install successfully because it is treated as new app.
  3. Now uninstall this app. Which will clear the data.
  4. Now change the ApplicationId to the previous one.
  5. Build and install. Magic.. It will install.