我尝试通过adb安装apk到连接的设备:
adb -d install android-debug.apk
但无法删除旧的apk:
2956 KB/s (2131317 bytes in 0.704s)
pkg: /data/local/tmp/android-debug.apk
Failure [INSTALL_FAILED_ALREADY_EXISTS]
rm failed for -f, No such file or directory
有没有办法强制安装?
答案 0 :(得分:2)
adb install -r android-debug.apk
-r
取代现有的APK。
我知道,它是not documented ...但是命令的--help
列出了:
adb install [-lrtsd] <file> - push this package file to the device and install it
(-l: forward lock application)
(-r: replace existing application)
(-t: allow test packages)
(-s: install application on sdcard)
(-d: allow version code downgrade)
(-p: partial application install)