转自: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
  1. <manifestxmlns:android="http://schemas.android.com/apk/res/android"
  2. android:installLocation="auto"

android:installLocation的属性值有三种:

preferExternal表示直接安装到SDCard,当外部存储空间不够时APP会安装到手机ROM中。

auto表示安装到手机ROM中,当手机ROM空间不够时APP会安装到外部存储中。

以上两种方式都可以供用户在两种存储中互相切换。

internalOnly表示只可以安装到手机ROM。


更多相关文章

  1. Eclipse安装Android教程
  2. Android开发环境的搭建
  3. android控件隐藏与显示
  4. Android设置TextView字间距与行间距
  5. 移植android的工作环境
  6. 整理:RelativeLayout的相关属性
  7. android 5.0多用户支持
  8. 使用eclipse打开android_sdk自带的例子
  9. android 实现静默安装、卸载

随机推荐

  1. android中@+id 与@string的使用
  2. Android EditText样式自定义
  3. 【Android】Android设计准则
  4. Android 4.0后,自定义Title报错 You canno
  5. 调用android手机微博客户端发送微博
  6. Android 全屏设置
  7. Android TextView Marquee的应用实例详解
  8. Android keytool 生成证书MD5指纹
  9. Android 学习记录
  10. Android 应用指定浏览器开发实例