Android:ADB各类错误

need APK file on command line

Performing Push Install
adb.exe: need APK file on command line

解决方法:
查看安装包是否后缀不正确,如被微信重命名加了.1


Failure[INSTALL_FAILED_SHARED_USER_INCOMPATIBLE]

Failure [INSTALL_FAILED_SHARED_USER_INCOMPATIBLE]

解决
因为在在manifest中设置了 android:sharedUserId="android.uid.system" 属性,但没有进行对应的系统签名。进行系统签名,或者去除android:sharedUserId="android.uid.system" 属性.


Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]

解决
版本较老,需要提高所安装的版本号,或卸载后再安装(如果是系统软件,需要root后,删除/system/app对应的软件包)。


Failure [INSTALL_FAILED_INVALID_URI]

  1. 使用绝对路径
adb install /mnt/usb/0BA1-1862/b/demo.apk
  1. 还有说法是加上-r
adb install -r   /mnt/usb/0BA1-1862/b/demo.apk
  1. 也有说需要加系统签名,

Failure [INSTALL_FAILED_TEST_ONLY]

解决
debug版本需要加-t以测试模式运行

adb install -t demo.apk

Failure [INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install com.ah.sample without first uninstalling .]

Performing Streamed Install
adb: failed to install test.apk: Failure [INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install com.ah.sample without first uninstalling        .]

解决
有同名包名app,需卸载重装。
如果是系统软件,需要root后,删除/system/app对应的软件包

  • 手动卸载后重装,
  • adb uninstall 包名之后再安装

  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值