Android adb安装apk时提示Invalid APK file

今天在使用adb命令安装apk时,无法安装成功,进入到android sdk 下的platform_tools下也是无法安装成功:

先贴一下我的调用过程

xu:~ xiaokai$ adb devices
List of devices attached
0123456789ABCDEF    device

xu:~ xiaokai$ adb shell
shell@T36DH_CM3:/ $ pm install /Users/xiaokai/Downloads/app-release.apk 
    pkg: /Users/xiaokai/Downloads/app-release.apk
Failure [INSTALL_FAILED_INVALID_URI]
1|shell@T36DH_CM3:/ $ adb install /Users/xiaokai/Downloads/app-release.apk 
Invalid APK file: /Users/xiaokai/Downloads/app-release.apk
255|shell@T36DH_CM3:/ $ exit
xu:~ xiaokai$ adb install /Users/xiaokai/Downloads/app-release.apk 
[100%] /data/local/tmp/app-release.apk
    pkg: /data/local/tmp/app-release.apk
Success
  • adb devices

     首先调用了adb devices,查看有没有可用的手机,`0123456789ABCDEF  device`说明有可用的手机,
    
  • adb shell

    然后进入手机,安装apk,
    
  • pm install /Users/xiaokai/Downloads/app-release.apk

    发现出现问题,
    
  • exit

     退出前手机 ,进入root目录
    
  • adb install /Users/xiaokai/Downloads/app-release.apk

     进行安装,发现安装成功,网上查了一下,下面这篇文章介绍了一些这方面的问题
    

    推荐一篇相关文章:http://blog.csdn.net/leon1741/article/details/54973677

你可能感兴趣的:(Android,android,shell,apk)