您的位置:首页 > 大数据 > 人工智能

Installation error: INSTALL_FAILED_MEDIA_UNAVAILABLE

2014-12-18 17:38 253 查看
问题描述:

用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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: