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
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.
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
.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With