0

I have created an empty app with the Eclipse wizard,

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.locationtest"
    android:versionCode="1"
    android:versionName="1.0"
    android:installLocation="auto"
    >
    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="18" />

the Move to SD card button is enabled, but when I press it I finally get a couldn't move app message.

How do I move an app to the SD card?

UPDATE:

when I set

android:installLocation="preferExternal"

I get

Installation error: INSTALL_FAILED_CONTAINER_ERROR

in Eclipse and in the log:

D/AndroidRuntime( 8127): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime( 8127): CheckJNI is ON
D/AndroidRuntime( 8127): Calling main entry com.android.commands.pm.Pm
W/ActivityManager( 2207): No content provider found for permission revoke: file:///data/local/tmp/LocationTest.apk
D/VoldCmdListener( 2119): asec list
I/PackageHelper( 6435): Size of container 2 MB
D/VoldCmdListener( 2119): asec create smdl2tmp1 2 fat {} 10010
E/Vold    ( 2119): Error opening devmapper (No such file or directory)
E/Vold    ( 2119): ASEC device mapping failed (No such file or directory)
E/PackageHelper( 6435): Failed to create secure container smdl2tmp1
E/DefContainer( 6435): Failed to create container smdl2tmp1
W/ActivityManager( 2207): No content provider found for permission revoke: file:///data/local/tmp/LocationTest.apk
D/dalvikvm( 2207): GC_EXPLICIT freed 1131K, 38% free 15050K/24007K, paused 2ms+7ms
D/AndroidRuntime( 8127): Shutting down VM
D/dalvikvm( 8127): GC_CONCURRENT freed 123K, 82% free 467K/2560K, paused 0ms+1ms
D/dalvikvm( 8127): Debugger has detached; object registry had 1 entries
D/dalvikvm( 8127): Compiler shutdown in progress - discarding request
D/dalvikvm( 8127): Compiler shutdown in progress - discarding request
I/AndroidRuntime( 8127): NOTE: attach of thread 'Binder Thread #3' failed

UPDATE 2:

It looks like this happens on devices of only one particular manufacturer. Or maybe this is because of an SD card left in some improper state (no idea what could be wrong).

18446744073709551615
  • 16,368
  • 4
  • 94
  • 127

2 Answers2

0

use android:installLocation="preferExternal" instead of android:installLocation="auto"

refer this link http://developer.android.com/guide/topics/manifest/manifest-element.html#install

if above does not helped try this,

remove this file from your device

/mnt/secure/asec/smdl2tmp1.asec

If you don't have root access, you need to mount the sdcard and remove it via pc:

/.android_secure/smdl2tmp1.asec

reference:

SO

Community
  • 1
  • 1
nitesh goel
  • 6,338
  • 2
  • 29
  • 38
0

There are some kind of app that couldn't be moved..

read here:Install location

allemattio
  • 1,836
  • 17
  • 33