Install failed container error

I generated an apk package for my android application. and I tried to install the package (apk) on android platform 4.1 (level 16) using the adb command but it genrates error: Failure [

I generated an apk package for my android application. and I tried to install the package (apk) on android platform 4.1 (level 16) using the adb command but it genrates error:

Failure [INSTALL_FAILED_CONTAINER_ERROR]

when trying to run with eclipse (run button) for the same platform (4.1 level 16) it works without a problems

this behaviour is not reproduced for platform 2.1 and platform 3.2

asked Sep 18, 2012 at 15:35

MOHAMED's user avatar

MOHAMEDMOHAMED

40.6k55 gold badges158 silver badges263 bronze badges

1

You need to make changes in AndroidManifest.xml. The change which you need to do is. Change :

android:installLocation="preferExternal"

to

android:installLocation="auto"

this worked for me.

emidander's user avatar

emidander

2,33321 silver badges29 bronze badges

answered Jan 30, 2013 at 4:29

JNI_OnLoad's user avatar

JNI_OnLoadJNI_OnLoad

5,4724 gold badges34 silver badges60 bronze badges

1

This will happen if android:installLocation is set to "preferExternal" and you have an AVD with a too small SD card. Increase the size of the SD card or change installLocation to auto in AndroidManifest.xml.

answered Jul 4, 2013 at 8:44

emidander's user avatar

emidanderemidander

2,33321 silver badges29 bronze badges

2

I got this error when I deleted my app after changing the MainActivity’s name. idk if the app didn’t install due to space issues or the phone thought the package is corrupt but deleting the dalvik cache and rebooting solved it for me.

answered Aug 7, 2015 at 19:35

user2161301's user avatar

user2161301user2161301

6047 silver badges20 bronze badges

0

INSTALL_FAILED_CONTAINER_ERROR is also returned when trying to install an apk that contains native libraries compiled for a different architecture.

Try running «logcat» from the «adb shell» after you get the error. If it reports a java IOException «Failed to extract native code» then you need to install the apk on an avd created for the native library architecture, or include native libraries in your apk for the architecture on your avd/device.

answered Dec 1, 2015 at 23:59

Felix Bellaby's user avatar

I wasnt able to change manifest of the build, so for me was the solution unmount SD card, install app and then mount it back.

answered Nov 13, 2014 at 9:03

user3098756's user avatar

user3098756user3098756

3404 silver badges10 bronze badges

i change installLocation="auto" in manifest but not work. I found problem in something wrong with my sdcard.

So, i change android:installLocation="preferExternal to internalOnly.
It work for me!

answered Apr 14, 2017 at 6:09

Linh Van's user avatar

My issue got solved by wiping the emulator data

answered Sep 28, 2022 at 15:33

JoelSebstn's user avatar

JoelSebstnJoelSebstn

4843 silver badges5 bronze badges

I generated an apk package for my android application. and I tried to install the package (apk) on android platform 4.1 (level 16) using the adb command but it genrates error:

Failure [INSTALL_FAILED_CONTAINER_ERROR]

when trying to run with eclipse (run button) for the same platform (4.1 level 16) it works without a problems

this behaviour is not reproduced for platform 2.1 and platform 3.2

asked Sep 18, 2012 at 15:35

MOHAMED's user avatar

MOHAMEDMOHAMED

40.6k55 gold badges158 silver badges263 bronze badges

1

You need to make changes in AndroidManifest.xml. The change which you need to do is. Change :

android:installLocation="preferExternal"

to

android:installLocation="auto"

this worked for me.

emidander's user avatar

emidander

2,33321 silver badges29 bronze badges

answered Jan 30, 2013 at 4:29

JNI_OnLoad's user avatar

JNI_OnLoadJNI_OnLoad

5,4724 gold badges34 silver badges60 bronze badges

1

This will happen if android:installLocation is set to "preferExternal" and you have an AVD with a too small SD card. Increase the size of the SD card or change installLocation to auto in AndroidManifest.xml.

answered Jul 4, 2013 at 8:44

emidander's user avatar

emidanderemidander

2,33321 silver badges29 bronze badges

2

I got this error when I deleted my app after changing the MainActivity’s name. idk if the app didn’t install due to space issues or the phone thought the package is corrupt but deleting the dalvik cache and rebooting solved it for me.

answered Aug 7, 2015 at 19:35

user2161301's user avatar

user2161301user2161301

6047 silver badges20 bronze badges

0

INSTALL_FAILED_CONTAINER_ERROR is also returned when trying to install an apk that contains native libraries compiled for a different architecture.

Try running «logcat» from the «adb shell» after you get the error. If it reports a java IOException «Failed to extract native code» then you need to install the apk on an avd created for the native library architecture, or include native libraries in your apk for the architecture on your avd/device.

answered Dec 1, 2015 at 23:59

Felix Bellaby's user avatar

I wasnt able to change manifest of the build, so for me was the solution unmount SD card, install app and then mount it back.

answered Nov 13, 2014 at 9:03

user3098756's user avatar

user3098756user3098756

3404 silver badges10 bronze badges

i change installLocation="auto" in manifest but not work. I found problem in something wrong with my sdcard.

So, i change android:installLocation="preferExternal to internalOnly.
It work for me!

answered Apr 14, 2017 at 6:09

Linh Van's user avatar

My issue got solved by wiping the emulator data

answered Sep 28, 2022 at 15:33

JoelSebstn's user avatar

JoelSebstnJoelSebstn

4843 silver badges5 bronze badges

NJDude


  • #2

You can do that easily using the Manifest Editor by adding this line:

SetManifestAttribute("android:installLocation", "auto")

It should be listed on the IDE (I actually made a wish a while ago but Erel ignored me :()

pluton


  • #3

Thanks for answer NJDude but I know that I can manually edit manifest but I’m lazy so I wish just to click in IDE on «auto» and that is it :)

That is two of us which wish that «auto» option in IDE. Maybe Erel will listen to us now ;)

  • #4

Not sure if this is a problem with the emulator. When I try to install an app (dev with B4A) to the emulator using adb (e.g. command of adb install GPSMap.apk), I get INSTALL_FAILED_CONTAINER_ERROR. I’ve tried installing to the emulator’s sdcard (size 100MB) using adb’s -s option but get the same error. I have ‘#CanInstallToExternalStorage: True’ in the code.

Erel


  • #5

Why don’t you install it from the IDE?

I recommend you to test it with a real device.

  • #6

Because, at the moment, I’m not able to use the emulator in Windows due to a problem in Wine: so I have tried to use the emulator in my Linux distro (Ubuntu), which requires the app to be installed by adb as B4A runs under Windows (i.e. for me, in Wine).

I can test it in a real device but it’s a slightly convoluted procedure to transfer & install in a real device as I can’t make B4A compile to a real device: probably due to another problem in Wine.

Erel


  • #7

I see. Have you tried setting this attribute to false?

  • #8

I see. Have you tried setting this attribute to false?

I’ve tried that with no success. I’ve just got closer with the attribute as True. ‘adb install /home/john/Temporary/GPSMap.apk» just failed with «Failure [INSTALL_FAILED_ALREADY_EXISTS]». I’ve been trying variants of the ‘adb uninstall’ command e.g. ‘adb uninstall dial2000computing.gpsmap’ but all fail.

I have in the Region code section:
#ApplicationLabel: GPSMap
#VersionCode: 1
#VersionName:

I have Package name (using the IDE) of dial2000computing.gpsmap. What am I doing wrong?

Erel


  • #9

Use adb install -r

It will reinstall the package.

  • #10

Use adb install -r

It will reinstall the package.

Thanks, Erel. It worked for my real device when I used Ubuntu (i.e. not Windows): so things are better on that side.

I mislead you in an earlier posting where I said [INSTALL_FAILED_ALREADY_EXISTS] was corrected for the emulator: it happens for a real device but not for the emulator. I still get [INSTALL_FAILED_CONTAINER_ERROR] for the emulator. I’ve tried #CanInstallToExternalStorage with both True & False, but both get this error.

Interestingly, ‘adb push /home/john/Temporary/GPSMap.apk /sdcard/Download/GPSMap.apk’ works OK but I don’t see any way of installing to the emulator from this file on the sdcard.

Last edited: Jan 18, 2014

Michaell


  • #11

Thanks for the advice. It is needed to run the ScrollView example program in the beginner’s guide.

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Install fabric any version ошибка
  • Install cv2 error
  • Insecure left 4 dead 2 как исправить
  • Input output error acronis
  • Innodb error number 28 means no space left on device

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии