简体   繁体   English

由于不同的应用程序签名,重新安装失败 - 再次

[英]Re-installation failed due to different application signatures - AGAIN

I create an APK and install it on the device.我创建了一个 APK 并将其安装在设备上。 All works OK.一切正常。

Then I try and run the app from Eclipse and it gives the error above.然后我尝试从 Eclipse 运行该应用程序,它给出了上述错误。 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?编辑:如果我想向从市场上正常安装的用户发送预发行版,如果我只是向他们发送 APK,那可以吗?

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).我有一段时间遇到同样的问题,我的解决方案是简单地导出应用程序(如发布时,使用发布密钥)并在我的手机上安装 that.apk 文件(我将其附加到电子邮件并将其发送到我)。
This will have the same effect as updating it normally through Google Play Store, and all previously saved data is retained.这将与通过 Google Play 商店正常更新具有相同的效果,并且将保留之前保存的所有数据。

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.它可能不如直接从 Eclipse 运行它方便,但必须一直卸载应用程序也不是一个很好的解决方案。

This happens when you for example install or run applications with the same package but signed with two different(may be debug) keys.例如,当您安装或运行具有相同 package 但使用两个不同(可能是调试)密钥签名的应用程序时,就会发生这种情况。 Just uninstall the application and run it from Eclipse againg.只需卸载应用程序并再次从 Eclipse 运行它。

You should be able to uninstall the application (either though the Android App Manager or apk uninstall <application package-path> ) and then deploy it.您应该能够卸载应用程序(通过 Android App Manager 或apk uninstall <application package-path> )然后部署它。 It seems to get confused when you do a proper install then try to deploy a dev build over it.当您进行正确安装然后尝试在其上部署开发版本时,似乎会感到困惑。

You may have messed up your debug certificate.您可能弄乱了调试证书。 Try to remove it from ~/.android/debug.keystore (Linux/Mac OS X);尝试从 ~/.android/debug.keystore (Linux/Mac OS X) 中删除它; or %USERHOME%/.android on Windows.或 Windows 上的 %USERHOME%/.android。

then uninstall using adb your app: adb uninstall yourpackagename然后使用 adb 卸载您的应用程序: adb uninstall yourpackagename

And try to launch it again from eclipse.并尝试从 eclipse 再次启动它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM