Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
247 views
in Technique[技术] by (71.8m points)

android - What does this mean: Failure [INSTALL_FAILED_CONTAINER_ERROR]?

I try to deploy my app and sometimes get this error:

Failure 
[INSTALL_FAILED_CONTAINER_ERROR] 

I tried to google it but don't find what the error means or what it's caused by. I deploy via IDE (IntelliJ) the file gets copied to the device to the /data/local/tmp (unrooted Huawei Ideos, running 2.2), but the package manager doesn't seem to like it. Before installing the apk, I already removed the app from the device beforehand. I also made sure there was no old file under /data/local/tmp on the device. Still I'm getting this error now. The package should be signed with the debug key, since I deploy via IDE by 'running' the app.

$ pwd 
/data/local/tmp 
$ ls -l 
-rw-rw-rw- shell    shell    17257686 2011-04-21 20:31 
com.company.shop 
$ pm install -r com.company.shop 
        pkg: com.company.shop 
Failure [INSTALL_FAILED_CONTAINER_ERROR]

What does it mean and how to resolve it?

Edit/Update:

I can avoid the error when not allowing the app to be installed on sdcard, setting

android:installLocation="internalOnly"

in the manifest. It's ok for development, but for production, it's not really what I want - since my app is quite large with 17mb; therefore I prefer it to be on sdcard. How to ever be able to install it on the external memory without rooting (since this is the only way I could delete /mnt/secure/asec/smdl2tmp1.asec, which seems to be one solution as well).

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Change the install location from

android:installLocation="preferExternal"

into

android:installLocation="auto"

in your project's AndroidManifest.xml.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...