INSTALL_FAILED_SHARED_USER_INCOMPATIBLE while using shared user id

后端 未结 10 1143
情深已故
情深已故 2020-11-28 10:33

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 try

相关标签:
10条回答
  • 2020-11-28 11:06

    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".

    0 讨论(0)
  • 2020-11-28 11:09

    In my case, the two app was signed with differents signatures. Using the same signature fix my problem

    0 讨论(0)
  • 2020-11-28 11:12

    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:

    1. use the Build (from Android Studio Menu) -> Generate Signed APK
    2. build a debug version of apk (app1) with the key store information used by (app1 and app2)
    3. use adb to uninstall the previous apk
    4. use adb to install the signed debug-apk
    5. use adb to launch the app in debug mode
    6. connect the Android Studio debugger to the app
    0 讨论(0)
  • 2020-11-28 11:15

    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.

    0 讨论(0)
提交回复
热议问题