阅读484 返回首页    go 阿里云 go 技术社区[云栖]


android APP安装支持安装到SDCard

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

android:installLocation的属性值有三种:

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

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

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

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


最后更新:2017-04-02 17:51:23

  上一篇:go 百度2012暑期实习面经(自动化平台研发)
  下一篇:go android listview 设置点击效果selector