为什么ADB安装<同包名 - 永远释放>失败? [英] Why does adb install <same-packagename-always-release> fail?

查看:180
本文介绍了为什么ADB安装<同包名 - 永远释放>失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道 ADB安装不会取代现有的包,如果它是一个不同版本的键入的(即调试与发布)。

I know that adb install will not replace an existing package if it's of a different build type (i.e. debug vs. release).

Eclipse还成功地取代了,每当我运行调试会话调试的apk。

Eclipse also successfully replaces the debug apks whenever I run a debug session.

但是,当我试图 ADB安装用于替换现有的发布的APK与其他版本APK(同一个包的名字!),我得到一个失败消息:

But when I attempt adb install for replacing an existing release apk with another release apk (same package name!), I get a failure message:

adb install myapp-release.apk 
    pkg: /data/local/tmp/myapp-release.apk
Failure [INSTALL_FAILED_ALREADY_EXISTS]
745 KB/s (34310 bytes in 0.044s)

不是说应该工作?我在想什么?

Wasn't that supposed to work? What am I missing?

推荐答案

我想,如果已安装的应用程序,您需要提供 -r 键:

I suppose if the app is already installed, you need to supply the -r key:

adb install -r myapp-release.apk

亚洲开发银行求助:

'-r' means reinstall the app, keeping its data

这篇关于为什么ADB安装<同包名 - 永远释放>失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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