转自: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. 整理:RelativeLayout的相关属性
  2. android ImageView android:adjustViewBounds属性的作用。
  3. EditText的属性
  4. 判断手机类型
  5. android笔记一 控件属性
  6. [Android] 启动无线与网络设置的Action___android:duplicatePare
  7. android中属性动画
  8. 手机壁纸设置相关
  9. android关于获取手机唯一码的组合文章

随机推荐

  1. Android Launcher 如何去掉主菜单,所有应
  2. ListView分隔线
  3. Android ImageView图片拖动效果
  4. android button 基本原理
  5. Android 自学之对话框
  6. Android ViewGroup onInterceptTouchEven
  7. Android(安卓)Studio 的项目结构
  8. Android中View的量算、布局及绘图机制
  9. android通用文件操作
  10. android 页面滑动