2012-04-22 107 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" >