Android error: Failure [INSTALL_FAILED_SHARED_USER_INCOMPATIBLE]

[亡魂溺海] 提交于 2019-12-11 06:57:28

问题


I'm getting this error and don't know how to fix this:
When trying to run an Android app on a real device (NEXUS4(rooted) in my case) I'm getting the following error in the Console:

pkg: /data/local/tmp/test.apk Failure [INSTALL_FAILED_SHARED_USER_INCOMPATIBLE]

I've try to google this error and have got some solutions:

  1. Delete the source with "android.uid.system".
    ->The error fixed but I need to use SharedUserID for system permission so I can't take this.
  2. Use platform.pk8 and platform.x509.pem from "build\target\product\security" to signature my app.
    ->Same error occured.
  3. Add my own UID(the xml below(copied from system)) into packages.xml and reset.
    ->The app disappeard from my phone after reset. I've no idea why I can't see it.

    <shared-user name="android.uid.cc" userId="10910">
        <sigs count="1">
            <cert index="2" />
        </sigs>
        <perms>
             ...
        </perms>
    </shared-user>
    

None of these solutions solved the problem.
My andriod version is 4.4.2.
Any help would be greatly appreciated! Thanks.


回答1:


In other answer INSTALL_FAILED_SHARED_USER_INCOMPATIBLE while using shared user id they describe to do:

I got the solution for now .I followed the steps as follows

1) Removed existing application (if it is already installed )
2) Removed share user ID from android manifest
3) Bulid the application.
4) Now enter share user ID again
5) build the application 1 more time 

and It works !!!

Thanks to Hemant




回答2:


I met this error too, when run application show a dialog, most message is saying

INSTALL_FAILED_SHARED_USER_COMPATIBLE

Except this error above you mentioned, and another error in my logcat is:

Error using StatusBarManagerService - java.lang.SecurityException on android.permission.STATUS_BAR

Lastly, add platform debug key fixed it.



来源:https://stackoverflow.com/questions/22168783/android-error-failure-install-failed-shared-user-incompatible

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!