Android:ADB各类错误
16lz
2021-12-04
文章目录
- 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 Installadb.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 Installadb: 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 包名之后再安装
更多相关文章
- mybatisplus的坑 insert标签insert into select无参数问题的解决
- Android中短信拦截解决方案
- 报错android.view.WindowLeaked解决办法
- Android(安卓)中Failed to read key from keystore解决办法
- android 按钮按下时改变字体颜色
- 设置android:elevation无效
- Android(安卓)SDK 更新失败(google相关网站被屏蔽)解决方法
- Android(安卓)Studio 使用中遇到的问题和解决方案
- ndk 编译android内核模块无法加载 解决方法