android:installlocation="auto",當設置錯誤android:installLocation = " preferExternal "

when I set the Manifest.xml file like this

當我設置艙單。xml文件是這樣

package="com.fugo.Rocket"

android:versionCode="1"

android:versionName="1.0"

android:installLocation="preferExternal">

the android installation will get error

android安裝將會出錯

[2011-03-24 18:18:47 - Rocket Project] Installation error: INSTALL_FAILED_CONTAINER_ERROR [2011-03-24 18:18:47 - Rocket Project] Please check logcat output for more details. [2011-03-24 18:18:47 - Rocket Project] Launch canceled!

[2011-03-24 18:47 -火箭項目]安裝錯誤:INSTALL_FAILED_CONTAINER_ERROR [2011-03-24 18:18:47 - Rocket Project]請查看logcat輸出。[2011-03-24 18:47 -火箭計划]發射取消!

but when I set android:intallLocation="auto"

但當我設置android時,intallLocation="auto"

the installation is success. why is that?

安裝成功。這是為什么呢?

logcat Error

logcat錯誤

03-24 18:48:38.784: ERROR/PackageHelper(1284): Failed to create secure container smdl2tmp1 03-24 18:48:38.784: ERROR/DefContainer(1284): Failed to create container smdl2tmp1 03-24 18:48:38.784: ERROR/Vold(86): ASEC file '/mnt/secure/asec/smdl2tmp1.asec' currently exists - destroy it first! (Address already in use)

錯誤/PackageHelper(1284):創建安全容器smdl2tmp1失敗(86):ASEC文件/mnt/secure/asec'當前存在-先摧毀它!(地址已經在使用)

5 个解决方案

#1

6

Check what your minSDKversion is set to. This feature is available only from FROYO. (SDK VERSION 8 onwards).

檢查您的minSDKversion設置為什么。這個功能只能從FROYO獲得。(SDK VERSION 8起)。

Also you need to compile this and run on Android2.2 sdk

您還需要編譯它並在Android2.2 sdk上運行

#2

2

In my case, the file smdl2tmp1.asec was somehow corrupted. I put the card on the PC and I was not even able to copy that file into my harddisk (for backup). So I had to delete it, and it solved the problem.

在我的例子中,文件smdl2tmp1。asec在某種程度上損壞。我把卡放在電腦上,甚至無法將文件復制到我的硬盤中(用於備份)。所以我不得不刪除它,它解決了問題。

Yesterday my phone rebooted while installing a game, and I think it has somehitng to do with this problem.

昨天我的手機在安裝游戲時重啟了,我認為這和這個問題有關。

#3

2

It appears Android is a little buggy in this respect, and does not handle all possible cases correctly.

在這方面,Android似乎有點問題,並且不能正確地處理所有可能的情況。

I had a similar, but more complicated problem. The solution is basically to delete the appropriate file in /sdcard/.android_secure/... See also:

我有一個類似的,但更復雜的問題。解決方案基本上是刪除/sdcard/.android_secure/…中的適當文件。參見:

http://www.androidpolice.com/2011/04/19/fixing-the-couldnt-install-on-usb-storage-or-sd-card-problem-on-android/

My own problem involved two android devices. One app was installed on device#1 (Android 2.2), then I mounted device#1 onto device#2 (an Android 4.0.3). Then I installed the same app on device#2. Guess what, it installed onto the SD card of device#1, overwriting the install on device#1. The app did not work on device#2 after unmounting device#1. The app did still work on device#1. I uninstalled it on device#2, no errors, but could not re-install it (I got the error "Failed to create secure container smdl2tmp1").

我自己的問題涉及兩個android設備。一個應用程序安裝在設備#1 (Android 2.2)上,然后我將設備#1安裝到設備#2 (Android 4.0.3)。然后我在設備2上安裝了同樣的應用。猜猜看,它被安裝在1號設備的SD卡上,覆蓋了1號設備上的安裝。在卸載掉1號設備后,應用程序沒有在2號設備上工作。這個應用程序仍然可以在設備1上運行。我在設備#2上卸載了它,沒有錯誤,但是不能重新安裝它(我得到了錯誤“創建安全容器smdl2tmp1失敗”)。

My solution was to uninstall the app on device#1, then re-mount it onto device#2, then installing it on device#2 worked. Then I moved the app from SD card to internal memory.

我的解決方案是在設備1上卸載應用程序,然后重新安裝到設備2上,然后在設備2上安裝它。然后我把應用從SD卡移到了內存。

#4

1

May I suggest that you check and see if you have an external SD card mounted from your emulator? You can set it when you create your AVD.

我建議你檢查一下你是否有從你的模擬器上安裝的外部SD卡。您可以在創建AVD時設置它。

#5

0

Rebooting the device worked for me.

重啟設備對我來說很有用。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值