程序员潇然 发表于 2022-8-10 15:54:08

启动应用报错解决Installation failed due to INSTALL_FAILED_SHARED_US...

08/10 15:37:59: Launching 'app' on xxxxx for arm64.
Installation did not succeed.
The application could not be installed: INSTALL_FAILED_SHARED_USER_INCOMPATIBLE

List of apks:
'D:\Data\as_workspace\androidxxxx\app\build\outputs\apk\debug\app-debug.apk'
Installation failed due to: 'INSTALL_FAILED_SHARED_USER_INCOMPATIBLE: Package com.xxxxx.xxxxt tried to change user android.uid.system'
Retry
Failed to launch an application on all devices

!(data/attachment/forum/202208/10/154710gzh736xm9f33wbxm.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")

### 问题原因

涉及到系统权限,有的应用增加了系统权限,有的没有增加。

有的应用设置了系统签名相关,有的没有设置。

### 1.不涉及签名

检查下manifast 文件!(data/attachment/forum/202208/10/155057eycyvrp90vavxc7k.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png"), 是否有

`android:sharedUserId="android.uid.system"`

!(data/attachment/forum/202208/10/154943mngdgp6wx6z2pblp.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")

**如果有**请删除这一行内容,也就是去掉`android:sharedUserId="android.uid.system"`

### 2.如果有签名

如果有签名,也还是先检查下这块内容,如果没有请添加上。

我的问题就是apk本身是涉及签名的,但是这一行注释掉了,添加上就好了

### 如果还不行,可以进一步尝试下面的方法

检查系统签名本身或者加入方法是否有问题?
如果系统签名没有问题,应该是系统中已经有了一个APK,而现在的APK要加入system uid,此时应先删除系统中存在的APK,再重启

!(data/attachment/forum/202206/16/141330jha7st9soow8772i.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "common_log.png")
`转载务必注明出处:程序员潇然,疯狂的字节X,https://crazybytex.com/thread-134-1-1.html `
页: [1]
查看完整版本: 启动应用报错解决Installation failed due to INSTALL_FAILED_SHARED_US...