Installation error: INSTALL_FAILED_MEDIA_UNAVAILABLE

来源:互联网 发布:sql 试图的意义 编辑:程序博客网 时间:2024/06/06 05:28

问题描述:

用eclipse编译程序,然后在android手机上运行,报错如下:

[2012-06-21 12:56:17 - xmobile17] Installation error: INSTALL_FAILED_MEDIA_UNAVAILABLE

[2012-06-21 12:56:17 - xmobile17] Please check logcat output for more details.

[2012-06-21 12:56:18 - xmobile17] Launch canceled!

使用logcat查看log,显示错误如下:

NOTE: attach of thread 'Binder Thread #3' failed

原因是某些应用程序(如360、91手机助手)造成手机无法在SD卡上安装程序

 

解决方法:

卸载这些垃圾软件,或者使用adb shell让手机自己选择安装在哪里,命令如下:

adb shell

pm setInstallLocation 0

PS.不同的setInstallLocation说明:

pm setInstallLocation 0 由App自行决定软件能否安装在SD卡

pm setInstallLocation 1 强制全部App安装在ROM内

pm setInstallLocation 2 强制全部App安装在SD卡


PS:如果是手机连接PC的模式,选择了存储模式,导致找不到存储卡,也会报此错误


解决办法:

I've solved the problem - it seems that if you close the (weird) empty DOS prompt that opens when the emulator is started, the connection to the emulator is lost.

Leaving the DOS window open, everything works like a charm.


0 0
原创粉丝点击