手动安装更新的APK失败,并显示“签名与先前安装的版本不匹配". [英] Manually installing an updated APK fails with "signatures do not match the previously installed version"

查看:1294
本文介绍了手动安装更新的APK失败,并显示“签名与先前安装的版本不匹配".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立了一个愚蠢的应用程序,可以在几个朋友之间共享.无需将其放在应用商店中.

I've built a silly app to share among a few friends. No need to put it up on the app-store.

我构建了第一个apk(已签名),并将其上传到网络服务器,并且一切正常.

I built the first apk (signed), uploaded it to a web-server and all worked well.

出现了一个小问题,我对其进行了修复,重建,使用相同的密钥库进行签名并再次上传.现在看来,我无法从新的apk安装.调试器告诉我:

A small issue arose, I fixed it, re-built, signed with the same keystore and uploaded it again. It now seems that I am unable to install from the new apk. The debugger tells me:

signatures do not match the previously installed version

因此,我通过打开应用程序抽屉并将其拖动到卸载"按钮上来卸载了旧版本.打开设置->应用程序"时,我再也看不到它了.我在设备上看不到该应用程序的任何痕迹.

So I uninstalled the old version by opening the app drawer and dragging it onto the "uninstall" button. When opening "Settings -> Apps", I don't see it anywhere anymore. I don't see any traces of the app on my device.

但是我仍然收到上述错误消息.

Yet I still get the above error message.

是否有一些信息仍在设备上徘徊?我有什么办法可以验证这一点?

Is it possible some information still lingers on the device somewhere? Is there any way I can verify that?

推荐答案

是的,如果您不能够100%删除旧应用程序或不删除其数据,则有可能.

Yes It is possible if somehow your old application is not removed 100% or its data is not removed.

尝试:

adb uninstall "com.yourapp.yourapp"

如果您不确切知道要替换"com.yourapp.yourapp"的内容,那么您只需打开Android Studio,在连接到设备的状态下运行应用程序,然后查看调试"窗口即可.

If you don't know exactly what to put as replacement for "com.yourapp.yourapp", then you just open Android studio, Run your app while it is connected to a device and then look at Debug window.

它说:

 Waiting for device.
 Target device: samsung-sm_t531-xxxxxxxxx
 Uploading file
 local path: C:\Users\myapp\app\build\outputs\apk\myapp.apk
 remote path: /data/local/tmp/com.myapp.myapp
 Installing com.myapp.myapp
 DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.myapp.myapp"
 pkg: /data/local/tmp/com.myapp.myapp
 Success

在这种情况下,

com.myapp.myapp是您必须用来卸载的软件包的名称.

com.myapp.myapp in this case is the name of the package you must use to uninstall.

这篇关于手动安装更新的APK失败,并显示“签名与先前安装的版本不匹配".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆