在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】EditText标签调用键盘
  3. android:gravity 和 android:layout_Gravity的区别
  4. Android(安卓)Text控件之属性:android:textAppearance
  5. 【Android布局】在程序中设置android:gravity 和 android:layout
  6. Android(安卓)TextView内容过长加省略号,点击显示全部内容
  7. 【Android布局】在程序中设置android:gravity 和 android:layout
  8. 【安卓学习之开发工具】 Android(安卓)Studio学习 6 - Android(
  9. 元素可指定如下常用属性

随机推荐

  1. android性能优化之布局优化
  2. [Android] 利用java反射调用隐藏Api
  3. 2018 Android(安卓)文章合集 200+ 篇
  4. Android(安卓)中几种更新UI界面的方法
  5. android 各版本区别
  6. Android(安卓)View视图绘制
  7. 移动安全-java JEB安装使用
  8. Invalidate和postInvalidate的区别
  9. 安卓基础知识总结
  10. 最新Android(安卓)Studio更换应用图标方