2012-04-22 105 views

回答

1

您可以为您的安装在你的SD card.You将需要此选项在您的清单

<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
android:installLocation=["auto" | "internalOnly" | "preferExternal" 

您可以在这些选择。 但默认情况下,您的应用程序将始终保存在设备上。用户可以随时将其传输到SD卡。

1

查看这里的android文档[1]。要安装到SD卡,将

<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
android:installLocation="preferExternal"> 

在您的清单中。

为了向后兼容,使用“auto”而不是“preferExternal”。

[1] http://developer.android.com/guide/appendix/install-location.html

1

在您的Manifest文件中,它被设置为默认值,所以当用户下载应用程序时,它将被下载到他们的移动存储器中。如果您希望用户必须将应用程序迁移到他们的SD卡的选项,你可以添加:

android:installLocation="auto" 

应放入清单部分。例如:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.android.application" 
    android:installLocation="auto" 
    android:versionCode="1" 
    android:versionName="1.0" >