美文网首页
adb安装出现错误Failure [INSTALL_FAILED

adb安装出现错误Failure [INSTALL_FAILED

作者: 天天想念 | 来源:发表于2021-06-24 09:47 被阅读0次

安装时候碰到的一个问题:已经签名的包,重新通过adb install 会提示安装错误。提示:Failure [INSTALL_FAILED_ALREADY_EXISTS]
为啥eclipse自己就可以不停滴覆盖重装呢?
因为eclipse自动打包是debug的签名,而我打如果是release签名就会出现上面的报错。
解决办法:adb install -r

adb install的相关参数
adb install [-l] [-r] [-d] [-s] [--algo <algorithm name> --key <hex-encoded key> --iv <hex-encoded iv>] <file>  - push this package file to the device and install it
                                 ('-l' means forward-lock the app)
                                 ('-r' means reinstall the app, keeping its data)
                                 ('-d' means allow version code downgrade)
                                 ('-s' means install on SD card instead of internal storage)
                                 ('--algo', '--key', and '--iv' mean the file is encrypted already)

adb install -r 这里的r是reinstall 的缩写
adb install -r  (reinstall) 重装
adb install -s (sdcard)  装在SD卡上而不是internal storage
adb uninstall -k (keep) 保留用户数据。

相关文章

网友评论

      本文标题:adb安装出现错误Failure [INSTALL_FAILED

      本文链接:https://www.haomeiwen.com/subject/vhftxxtx.html