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

时间:2022-04-25
本文章向大家介绍软件更新时候出现和原包名冲突,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

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

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:

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.

:)