前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >软件更新时候出现和原包名冲突

软件更新时候出现和原包名冲突

作者头像
xiangzhihong
发布2018-01-29 16:52:41
6300
发布2018-01-29 16:52:41
举报
文章被收录于专栏:向治洪向治洪

如果你是一个开发人员,那么出现这个问题可能是因为,较旧的版本你是使用eclipse自动发布到模拟器上的,而eclipse自动发布时使用的是一个测试用签名,这个签名与你正式打包的签名不是一个。(这个问题一般发生在测试自动更新功能上,嘿嘿)。想继续测试自动更新,解决的办法也很简单,手工删除该软件的旧版(eclipse自动安装的那个),然后使用adb工具安装旧版再测试新版就好。自动更新的安装代码一般是这样:

代码语言:js
复制
Intent i = new Intent(Intent.ACTION_VIEW);
 i.setDataAndType(Uri.parse("file://" + apkfile.toString()),
 "application/vnd.android.package-archive");
 mContext.startActivity(i);

或许你和这略有不同,不用担心,没什么,问题不在这里。

下面是给外国朋友的,请原谅我蹩脚的英语:

for foreigner,please forgive my broken:

When you try install a new version of a software on android, maybe you will receive this message: an existing package by the same name with a conficting signature is already installed!

I take it easy! Uninstall old version soft, and then install new version. In this process , maybe you need get "root" popedom.

If you are developer, you receive this message maybe because the old version is install by the eclipse. Eclipse use a debug keystore signature.  I guess you try test you autoupdate function. You can uninstall it (eclipse auto package version) in setting tool. And install the old version (which you signature package) by ADB.exe before you test autoupdate function. 

Autoupdate function code always like this:

代码语言:js
复制
Intent i = new Intent(Intent.ACTION_VIEW);
 i.setDataAndType(Uri.parse("file://" + apkfile.toString()),
 "application/vnd.android.package-archive");
 mContext.startActivity(i);

If you code not like this , dont worry , never mind,  the question not in there.

:)

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2014-05-10 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档