Q:

Failure [INSTALL_FAILED_CONTAINER_ERROR] when trying to install android apk package using adb for platform 4.1

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

A:

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.

A:

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.

A:

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.

