安装错误:INSTALL_FAILED_CONTAINER_ERROR [英] Installation error: INSTALL_FAILED_CONTAINER_ERROR

查看:445
本文介绍了安装错误:INSTALL_FAILED_CONTAINER_ERROR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  • 运行代码时,
    安装错误:INSTALL_FAILED_CONTAINER_ERROR发生

    请检查logcat输出以获取更多详细信息。
    启动已取消!


  • 我试图通过将
    android:installLocation =preferExternal更改为
    android:installLocation =auto


  • 但仍然现在Error保持不变。



AndroidMainfest.xml

 < manifest xmlns:android =http://schemas.android.com/apk/res/android
package =com.gems.android
android :versionCode =1
android:versionName =1.0
android:installLocation =auto
>

存储空间



>



LogCat:

  E / memtrack(1386):无法加载memtrack模块)
E / android.os.Debug(1386):无法加载memtrack模块:-2
D / AndroidRuntime(1386):调用主条目com.android.commands.pm.Pm
W / ActivityManager(381):未找到权限的内容提供者revoke:file:///data/local/tmp/GEMS.apk
E / Vold(47):创建imagefile时出错)
E / Vold(47):ASEC镜像文件创建失败(只读文件系统)
W / Vold(47):返回操作失败 - 没有errno的处理程序30
E / PackageHelper (640):无法创建安全容器smdl2tmp1
E / DefContainer(640):无法创建容器smdl2tmp1
W / ActivityManager(381):未找到权限的内容提供者revoke:file:/// data / local / tmp / GEMS.apk




  • SD卡中的可用内存也是483 MB。

  • 如果有人知道如何解决这些问题,请回复我。


解决方案

这是因为


ASEC映像档建立失败(只读档案系统)


安装,重新安装,chmod for SDcard将无助于 - 至少没有


  C:\Users\<用户名> \AppData\Local \Android\sdk\platform-tools> adb shell 
root @ generic:/#mount -o remount rw / storage / sdcard
mount -o remount rw / storage / sdcard
root @ generic:/#mount -o remount rw / mnt / sdcard
mount -o remount rw / mnt / sdcard
root @ generic:/#chmod -R 777 / mnt / secure / asec
chmod -R 777 / mnt / secure / asec
无法chmod / mnt / secure / asec:只读文件系统


仍然有无法chmod / mnt / secure / asec:只读文件系统 p>

Adb重置,根据Stack Overflow上的一些已接受的答案,也许是解决方案的一部分,但它也没有帮助。由于在安装 sdcard.img 文件(用作模拟器上的SD卡的图像的文件和 )之后,通过Windows资源管理器删除 SDCARD / .android_secure / smdl2tmp1.asec 可以位于C:\Users\.android\avd\.avd )与ImDisk程序(请确保您有在右侧选项卡映像文件访问 - >虚拟磁盘驱动器



即时帮助的是Android模拟器上的设置应用程序:存储 - >清除SD卡强>。如果您在AVD设置中选择了Intel Atom作为仿真器CPU,则可能必须暂时将其更改为ARM,以便通过仿真器擦除SD,因为据报告,SD格式化常常在仿真的Intel Atom CPU上出现故障。



希望有所帮助!


  • When running the code, Installation error:INSTALL_FAILED_CONTAINER_ERROR Occurred
    Please check logcat output for more details. Launch canceled!

  • I just try to solve these Error by changing the android:installLocation="preferExternal" into android:installLocation="auto"

  • But still now Error remains the same.So that apk couldn't be installed in Emulator.

AndroidMainfest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
 package="com.gems.android"
 android:versionCode="1"
 android:versionName="1.0"
 android:installLocation="auto"
  >

Storage:

LogCat:

E/memtrack(1386): Couldn't load memtrack module (No such file or directory)
 E/android.os.Debug(1386): failed to load memtrack module: -2
 D/AndroidRuntime(1386)  : Calling main entry com.android.commands.pm.Pm
 W/ActivityManager(381)  : No content provider found for permission revoke: file:///data/local/tmp/GEMS.apk
 E/Vold(47)              : Error creating imagefile (Read-only file system)
 E/Vold(47)              : ASEC image file creation failed (Read-only file system)
 W/Vold(47)              : Returning OperationFailed - no handler for errno 30
 E/PackageHelper(640)    : Failed to create secure container smdl2tmp1
 E/DefContainer(640)     : Failed to create container smdl2tmp1
 W/ActivityManager(381)  : No content provider found for permission revoke: file:///data/local/tmp/GEMS.apk

  • Available Memory in SD Card is also 483 MB.
  • If anybody know how to solve these reply me.Thank you.

解决方案

This is because of

ASEC image file creation failed (Read-only file system)

Mounting, remounting, chmod for SDcard won't help either - at least it didn't for me

C:\Users\<User Name>\AppData\Local\Android\sdk\platform-tools>adb shell
root@generic:/ # mount -o remount rw /storage/sdcard
mount -o remount rw /storage/sdcard
root@generic:/ # mount -o remount rw /mnt/sdcard
mount -o remount rw /mnt/sdcard
root@generic:/ # chmod -R 777 /mnt/secure/asec
chmod -R 777 /mnt/secure/asec
Unable to chmod /mnt/secure/asec: Read-only file system

Still got Unable to chmod /mnt/secure/asec: Read-only file system

Adb reset, as per some accepted answers here on Stack Overflow, was perhaps a part of solution, but it didn't help too. As neither helped deleting SDCARD/.android_secure/smdl2tmp1.asec via Windows explorer after mounting sdcard.img file(file that is used as an image for SD card on emulator and can be located in C:\Users\.android\avd\.avd ) with ImDisk program(please make sure you have on theright tab "Image file access" -> "Virtual disk drive accesses image file directly" radio checked).

What instantly helped was from Android Settings app on emulator: "Storage"->"Erase SD card". If you selected Intel Atom as emulator CPU in AVD settings, you may have to change it to ARM at least temporarily to erase the SD via emulator, since reportedly - SD formatting fails on emulated Intel Atom CPU quite often.

Hope that helps!

这篇关于安装错误:INSTALL_FAILED_CONTAINER_ERROR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆