Reputation: 1556
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.
Upvotes: 45
Views: 113943
Reputation: 33
Although you have accepted answer, I also want talk my situation which I met this error. My project is a Launcher which just happen to use some system grant like, Manifest.xml have two item:
<uses-permission android:name="android.permission.STATUS_BAR" />
or
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
and console log out:
Error using StatusBarManagerService - java.lang.SecurityException on android.permission.STATUS_BAR
Lastly, my colleague give me a hint using "platform debug key", I am not sure this will be suitable for you, but for another guys possibility for this kind question. The below picture is my solution: screenshot from project structure you might also notice 'Signing Config' of "Flavors" and "Build Types", you might choose 'Name:' of "Signing".
Upvotes: 2
Reputation: 1556
Follow these steps to fix the INSTALL_FAILED_SHARED_USER_INCOMPATIBLE
error:
sharedUserId
from AndroidManifest.xmlsharedUserId
to AndroidManifest.xmlUpvotes: 52
Reputation: 21
my issue was having a second instance of the app installed via Samsung Secure Folder! One I uninstalled it there too, my issue went away.
Upvotes: 1
Reputation: 27
Simply delete the existing application from mobile and reinstall using run.
Upvotes: 1
Reputation: 2796
I was using Emulator and the solution for me was to select the "AVD Manager" and Wipe all data from my Emulator device. After that application was installed.
Upvotes: 0
Reputation: 10529
I have encountered the same problem. I tried out everything, but unfortunately, nothing works for me. As it's a testing device no hesitated to do a factory reset. Oops. sucks didn't work either. Invalidate Cache/ Restart did the trick eventually. Looks like it's an Android Studio 3.5 bug.
Thanks.
Upvotes: 0
Reputation: 751
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.
Upvotes: 3
Reputation: 1068
In my case, the two app was signed with differents signatures. Using the same signature fix my problem
Upvotes: 8
Reputation: 133
I did a slightly different approach.
My work involves using a modified Android OS along with a modified adb tool. The app (app1) I am working on "shares a user" with another app (app2) by another team. In order for me to get the Android Studio debugger to work, I had to follow these steps in order:
Upvotes: 0
Reputation: 899
In my case, I had two build variants (one specific for a device, and one general).
I was running the device-specific build on an emulator when this error showed up.
Upvotes: 0
Reputation: 12940
This means something about your app was not correctly uninstalled. This steps help to force uninstall from internal commands:
$ 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
Upvotes: 13