简体   繁体   中英

Why would “adb install -r” uninstall the old version of the app?

I'm testing a complete rebuild of my application and want to make sure that the update will go smoothly. I'm having an issue when I have the old version and perform the "adb install -r" command. What I expect to happen is it just replaces the old version with the updated version. What happens is that the command line reports success but all it did was uninstall the old version and did not install the new version. I have tested this on a Galaxy Nexus with 4.2 and I have this problem but when I tested this on an S2 with 4.0 it works as expected and replaces the old version. Any ideas why this would happen on the GS and not the S2? Also will this happen to my users when they try to update the app from the market?

As far as I know, three things are important:

  • Package name;
  • Signing key;
  • Version code.

If the two firsts are identical, and the last one properly incremented, there should be no problem. Moreover, Google Play will reject your update if those things are not correct.

Was there a LogCat error message on the Galaxy Nexus?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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