由于应用程序签名不同,重新安装失败 - 再次
我创建一个 APK 并将其安装在设备上。一切正常。
然后我尝试从 Eclipse 运行该应用程序,但出现了上述错误。我没有做任何更改,甚至不需要重新编译。我尝试将其作为调试和发布运行,两者都有相同的错误。
以前可以正常工作的地方有些地方搞砸了:(
编辑:如果我想向从市场上正常安装的用户发送预发行版,如果我只向他们发送 APK,这样可以吗?
I create an APK and install it on the device. All works OK.
Then I try and run the app from Eclipse and it gives the error above. I didn't make any changes or even need recompiling. I tried running it as debug as well as release and both have the same errors.
Something is messed up somewhere as this used to work :(
EDIT: If I want to send out a pre release to users that have a normal install from the market, does that work ok, if I just send them the APK?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
例如,当您安装或运行具有相同包但使用两个不同(可能是调试)密钥签名的应用程序时,就会发生这种情况。只需卸载该应用程序并再次从 Eclipse 运行它即可。
This happens when you for example install or run applications with the same package but signed with two different(may be debug) keys. Just uninstall the application and run it from Eclipse againg.
您应该能够卸载该应用程序(通过 Android 应用程序管理器或
apk uninstall
),然后部署它。当您进行正确的安装然后尝试在其上部署开发版本时,似乎会感到困惑。You should be able to uninstall the application (either though the Android App Manager or
apk uninstall <application package-path>
) and then deploy it. It seems to get confused when you do a proper install then try to deploy a dev build over it.您可能弄乱了您的调试证书。尝试从 ~/.android/debug.keystore (Linux/Mac OS X) 中删除它;或 Windows 上的 %USERHOME%/.android。
然后使用 adb 卸载您的应用程序:
adb uninstall yourpackagename
并尝试从 eclipse 再次启动它。
You may have messed up your debug certificate. Try to remove it from ~/.android/debug.keystore (Linux/Mac OS X); or %USERHOME%/.android on Windows.
then uninstall using adb your app :
adb uninstall yourpackagename
And try to launch it again from eclipse.
例如,如果您想保留设置等用户数据,则没有必要也不可取地卸载应用程序。
我已经有一段时间遇到同样的问题了,我的解决方案只是导出应用程序(就像发布时一样,使用发布密钥)并将该 .apk 文件安装到我的手机上(我将其附加到电子邮件并将其发送到我自己)。
这与通过 Google Play 商店正常更新具有相同的效果,并且所有以前保存的数据都会保留。
它可能不如直接从 Eclipse 运行它那么方便,但必须一直卸载应用程序也不是一个很好的解决方案。
It is neither necessary nor desirable to perfom an uninstall of the application if, say, you want to preserve user data like settings.
I have had the same problem for a while, and my solution is simply exporting the app (like when publishing, with the release key) and intalling that .apk file on my phone (I attach it to an e-mail and send it to myself).
This will have the same effect as updating it normally through Google Play Store, and all previously saved data is retained.
It may not be as convenient as running it directly from Eclipse, but having to uninstall the application all the time is not such a great solution either.