文章目录
- need APK file on command line
- Failure[INSTALL_FAILED_SHARED_USER_INCOMPATIBLE]
- Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
- Failure [INSTALL_FAILED_INVALID_URI]
- Failure [INSTALL_FAILED_TEST_ONLY]
- Failure [INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install com.ah.sample without first uninstalling .]
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]
- 使用绝对路径
adb install /mnt/usb/0BA1-1862/b/demo.apk
- 还有说法是加上-r
adb install -r /mnt/usb/0BA1-1862/b/demo.apk
- 也有说需要加系统签名,
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 包名之后再安装
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)