将应用程序移动到SD卡

and*_*dev 37 android

在某些应用程式与SDK分钟3(Android 1.5的),我可以从我的Desire HD的移动应用程序到SD卡.(Android 2.2的)如何让程序可能与移动应用程序到SD卡需要Android 1.5及更高版本.

Oma*_*man 78

在manifest.xml的标记中添加android:installLocation ="auto"属性

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mycompany.myapp" android:installLocation="auto"
android:versionCode="2" android:versionName="1.2">
Run Code Online (Sandbox Code Playgroud)

它将为您的应用程序启用"移至SD卡"按钮.


Xio*_*ion 30

您需要包含android:installLocation="auto"或包含android:installLocation="preferExternal"<manifest>AndroidManifest.xml 的元素中.您还需要将目标API版本设置为Froyo(但最低API版本可以更低).

更多信息:http://developer.android.com/guide/appendix/install-location.html


RED*_*ull 6

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="string"
          android:sharedUserId="string"
          android:sharedUserLabel="string resource" 
          android:versionCode="integer"
          android:versionName="string"
          android:installLocation=["auto" | "internalOnly" | "preferExternal"] >

</manifest>
Run Code Online (Sandbox Code Playgroud)

仅供参考检查