当前位置:   article > 正文

Android:ADB各类错误_need apk file on command line

need apk file on command line

need APK file on command line

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

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


Failure[INSTALL_FAILED_SHARED_USER_INCOMPATIBLE]

Failure [INSTALL_FAILED_SHARED_USER_INCOMPATIBLE]
  • 1

解决
因为在在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
  1. 还有说法是加上-r
adb install -r   /mnt/usb/0BA1-1862/b/demo.apk
  • 1
  1. 也有说需要加系统签名,

Failure [INSTALL_FAILED_TEST_ONLY]

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

adb install -t demo.apk
  • 1

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        .]
  • 1
  • 2

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

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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/463103
推荐阅读
相关标签
  

闽ICP备14008679号