此报错的前因后果和这篇文章是一样的:链接如下 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" />
以上!修改即可