在Android工程中,设置apk的默认安装位置


在AndroidManifest.xml文件Manifest标签中添加android:installLocation属性

android:installLocation

这个属性设置的是默认安装位置, 共有三个有效值,auto、internalOnly、preferExternal

对应表

auto 表示自动,由系统决定安装位置

internalOnly 安装在手机内存

preferExternal 安装在外部存储中

Constant Value Description
auto 0 Let the system decide install location
internalOnly 1 Explicitly request to be installed on internal phone storage only
preferExternal 2 Perfer to be installed on SD card, There is no guarantee that the system will honor this request. The application might end up being installed on internal storage if external media is unavailable or too full


"http://schemas.android.com/apk/res/android"      package="com.ray"      android:installLocation="auto"      android:versionCode="1"      android:versionName="1.0">


更多相关文章

  1. android中view的一些属性
  2. Android Text控件之属性:android:textAppearance
  3. 元素可指定如下常用属性
  4. Android android:gravity属性介绍及效果图
  5. 相对布局属性
  6. Android xml manifest属性详解

随机推荐

  1. android button属性
  2. Cannot add extension with name 'androi
  3. View有关基础
  4. 指纹支付相关的细节处理
  5. Android(安卓)APK反编译详解(附图)
  6. Android(安卓)如何让EditText不自动获取
  7. Android(安卓)错误 'roundIcon' in packa
  8. android webservices sax 传输并解析xml
  9. 【转】Android字体小结
  10. 通过WifiManager,DhcpInfo获取android IP