Change the install location from
android:installLocation="preferExternal"
into
android:installLocation="auto"
in your project's AndroidManifest.xml.
remove this file from your device
/mnt/secure/asec/smdl2tmp1.asec
Edit/Update by Mathias Conradt (OP):
If you don't have root access, you need to mount the sdcard and remove it via pc:
/.android_secure/smdl2tmp1.asec
If you're using an emulator, edit it and add more memory. I've had a problem just like this one and all I did was edit my AVD's memory from 200 MB to 1000 MB and the problem seem to go away... Good Luck.
This means there was an earlier installation that was corrupt. If you install on external I would suggest that you format the sd card an try again.
I have had this error repeatedly. I have found the simplest way to avoid the error in its entirety is to simply format the SD card. Using the phone or emulators internal tools. I have found that the automatically generated SD cards or even making your own sdcard.iso fails and causes this error unless formated by the internal android tools.
For me this was caused by a lack of space on my emulator's SD card. I was working with a pretty large project and I had thought 40 mb was enough, but I changed it to 200 mb and the problem went away.
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