简体   繁体   中英

Install new APK version of my Android app from SD card

I recently fixed a bug in a demo version of my app. It's not out on the store yet, we're still testing.

The phone doesn't like it however : it tells me there's already an APK called that. That's true, but why doesn't it suggest to just replace it ?

And in the "Apps" settings screen, "Force quit" and "Uninstall" are greyed out - unclickable, can't do that for my app. Yes, I did quit my app, and the background service associated with it. Because yes, my app does require the following permissions :

  • Full Internet access
  • System tools : prevent sleeping, disable key lock, auto-start on boot
  • Hardware controls : audio volume
  • Storage : SD card

Any clues or things to do/check before uninstalling ? This other (empty) app that's also installed (an app I made when I was discovering Android for testing purposes) was uninstalled fine ...

Thanks in advance,

Charles

Possible causes I know of for it not offering to replace it:

  • You changed the package name, but you are using the same file name for the APK.
  • You signed the package with a different keystore or key. Note that when clicking Run in Eclipse, it uses a debug keystore rather than the one you would use when exporting it for the store.

I'm not sure why it would disallow force quitting and uninstall. Maybe you just need to wait a few more seconds for that screen to finish loading, and the buttons will become active.

You can try opening a console and using adb uninstall com.yourpackagename to uninstall the old version, and see if it gives you any errors.

Got it !

First of all, see Tenfour's answer on impossible replacement. As for impossible uninstallation :

The "Lock Screen" permission makes my app a Device Administrator. And Device Admins can't be uninstalled !

The app can be downgraded in Settings -> Security -> Device Admins.

That's all folks ! Thanks for the help.

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