Android应用安装错误:INSTALL_FAILED_MEDIA_UNAVAILABLE
2015-12-12 14:27
330 查看
在centos7系统上安装eclipse后进行真机调试,发现提示INSTALL_FAILED_MEDIA_UNAVAILABLE;
百度后解决了,在此记录下解决方法,以免下次出现类似问题。
这个问题出现的原因是Android应用安装位置当前不可用,而Android应用安装位置有手机rom内和sd card两种。由于Android设备没有sd card便有可能出现此情况。
解决方法:
1. 在AndroidManifest.xml下:
<manifest xmlns: android="http://schemas.android.com/apk/res/android"
android:installLocation="auto" >
这配置让Android系统自行决定应用的安装位置。
2. 使用adb shell命令让手机自己选择安装在哪里。
adb shell
pm set-install-location 0 #由App自行决定软件能否安装在SD卡上
pm set-install-location 1 #强制全部App安装在ROM内
pm set-install-location 2 #强制全部App安装在SD卡
百度后解决了,在此记录下解决方法,以免下次出现类似问题。
这个问题出现的原因是Android应用安装位置当前不可用,而Android应用安装位置有手机rom内和sd card两种。由于Android设备没有sd card便有可能出现此情况。
解决方法:
1. 在AndroidManifest.xml下:
<manifest xmlns: android="http://schemas.android.com/apk/res/android"
android:installLocation="auto" >
这配置让Android系统自行决定应用的安装位置。
2. 使用adb shell命令让手机自己选择安装在哪里。
adb shell
pm set-install-location 0 #由App自行决定软件能否安装在SD卡上
pm set-install-location 1 #强制全部App安装在ROM内
pm set-install-location 2 #强制全部App安装在SD卡
相关文章推荐
- 使用C++实现JNI接口需要注意的事项
- Android IPC进程间通讯机制
- Android Manifest 用法
- [转载]Activity中ConfigChanges属性的用法
- Android之获取手机上的图片和视频缩略图thumbnails
- Android之使用Http协议实现文件上传功能
- Android学习笔记(二九):嵌入浏览器
- android string.xml文件中的整型和string型代替
- i-jetty环境搭配与编译
- android之定时器AlarmManager
- android wifi 无线调试
- Android Native 绘图方法
- Android java 与 javascript互访(相互调用)的方法例子
- android 代码实现控件之间的间距
- android FragmentPagerAdapter的“标准”配置
- Android"解决"onTouch和onClick的冲突问题
- android:installLocation简析
- android searchView的关闭事件
- SourceProvider.getJniDirectories