INSTALL_FAILED_SHARED_USER_INCOMPATIBLE while using shared user id
I am working on Android application which will share the database. For that, I'm using android:sharedUserId
in both application's Manifest file. When I am trying to run the application after adding that sharedUserId
it shows me following errors in console.
[2013-03-04 19:37:32 - MainActivity] Installation error: INSTALL_FAILED_SHARED_USER_INCOMPATIBLE
[2013-03-04 19:37:32 - MainActivity] Please check logcat output for more details.
[2013-03-04 19:37:32 - MainActivity] Launch canceled!
Please help me to resolve this problem.
Solution 1:
I followed these steps:
- Removed existing application (if it is already installed )
- Removed share user ID from android manifest
- Bulid the application.
- Now enter share user ID again
- build the application 1 more time
Solution 2:
This means something about your app was not correctly uninstalled. This steps help to force uninstall from internal commands:
- Connect your phone to PC with usb
- From your shell launch:
$ adb shell
shell@android:/ $ su
shell@android:/ # pm list packages | grep <part of package>
package:com.android.providers.applications
package:com.android.providers.calendar
package:com.android.providers.contacts
package:com.android.providers.downloads
...
shell@android:/ # pm uninstall <package>
shell@android:/ # exit
shell@android:/ $ exit
$
Basically, you log into android shell, become superuser, find problematic packages, and uninstall it
Solution 3:
In my case, the two app was signed with differents signatures. Using the same signature fix my problem
Solution 4:
The solution for me was to select the "Build > Clean Project" menu option. It took a long time but the application deployed once it was complete.