2014-03-04 59 views
1

我得到這個錯誤,不知道如何解決這個問題:
當試圖在真實設備上運行Android應用程序(NEXUS4(rooted)在我的情況) m到處下面的錯誤在控制檯:Android錯誤:失敗[INSTALL_FAILED_SHARED_USER_INCOMPATIBLE]

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

我試圖谷歌這個錯誤,並已得到了一些解決方案:

  1. 刪除與「android.uid.system」的來源。
    - >修正了錯誤,但我需要使用SharedUserID來獲得系統權限,所以我不能接受它。
  2. 使用「build \ target \ product \ security」中的platform.pk8和platform.x509.pem簽名我的應用程序。
    - >發生同樣的錯誤。
  3. 將我自己的UID(下面的xml(從系統複製))添加到packages.xml並重置。
    - >應用程序在重置後從手機中消失。我不知道爲什麼我看不到它。

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

但是沒有一個方案解決了這個問題。
我的安卓版本是4.4.2。
任何幫助將不勝感激!謝謝。

+0

請考慮提供有關您的問題的更多詳細信息,以便我們可以嘗試幫助您,或只標記要關閉的問題。謝謝 –

回答

3

在其他答案INSTALL_FAILED_SHARED_USER_INCOMPATIBLE while using shared user id他們所描述的事:

我對於現在的解決方案。我遵循的步驟如下

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 

和它的作品!

由於與Hemant

0

我也遇到了這個錯誤,當運行應用程序顯示一個對話框,大多數消息是說

INSTALL_FAILED_SHARED_USER_COMPATIBLE

除了這個錯誤你上面提到的,在我的logcat另一個錯誤是:

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

最後,添加平臺調試密鑰修復它。

相關問題