android APP安装支持安装到SDCard
16lz
2021-12-04
转自:http://blog.csdn.net/zuolongsnail/article/details/7187375
1.只有Android2.2及以上版本支持APP安装到SDCard,也就是说Androidmanifest.xml中的android:minSdkVersion属性值大于等于8
2.在Androidmanifest.xml的manifest标签中添加android:installLocation属性。
[html] view plain copy
- <manifestxmlns:android="http://schemas.android.com/apk/res/android"
- android:installLocation="auto"
android:installLocation的属性值有三种:
preferExternal表示直接安装到SDCard,当外部存储空间不够时APP会安装到手机ROM中。
auto表示安装到手机ROM中,当手机ROM空间不够时APP会安装到外部存储中。
以上两种方式都可以供用户在两种存储中互相切换。
internalOnly表示只可以安装到手机ROM。
更多相关文章
- Eclipse安装Android教程
- Android开发环境的搭建
- android控件隐藏与显示
- Android设置TextView字间距与行间距
- 移植android的工作环境
- 整理:RelativeLayout的相关属性
- android 5.0多用户支持
- 使用eclipse打开android_sdk自带的例子
- android 实现静默安装、卸载