报错Installation failed with message Failed to finalize session : INSTALL

xiaoxiao2021-02-27  165

此报错的前因后果和这篇文章是一样的:链接如下 http://blog.csdn.net/willba/article/details/71189860

具体报错如下:

Installation failed with message Failed to finalize session : INSTALL_FAILED_CONFLICTING_PROVIDER: Package couldn’t be installed in /data/app/com.android.gallery3d-1: Can’t install because provider name com.android.gallery3d.provider (in package com.android.gallery3d) is already used by com.vivo.gallery. It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.

错误原因是provider发生了冲突,导致安装失败 解决方案如下: 把清单文件里面的provider的android:authorities改成别的名字,我这里是在最后加666,原先后面是没有数字的

<provider android:name="com.android.gallery3d.provider.GalleryProvider" android:syncable="false" android:grantUriPermissions="true" android:exported="true" android:permission="com.android.gallery3d.permission.GALLERY_PROVIDER" android:authorities="com.android.gallery3d.provider666" />

以上!修改即可

转载请注明原文地址: https://www.6miu.com/read-13061.html

最新回复(0)