Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

Some times when I install an application, the installation will fail.

However, the errors it throws are not only incorrect, but seemingly... random.

An example is, it'll fail and throw 'Insufficient storage space.' Blatant lie, I have plenty of space on the phone.

Another example is 'Package file is invalid.'

When I go to redownload the app, it usually installs just fine. On rarer occasions, it'll throw another (can't remember if it's the same) error, but then it'll install just fine.

I'm using stock market, on a stock Droid 3.

share|improve this question
1  
The logs will shed some light into these errors. If at all possible, try to get the logcat from the phone during the update, when you get the error message. You can use ADB from your computer, or an app like aLogcat, for example. –  Chahk Nov 22 '11 at 20:19
    
Problem is random when it does it and I don't install apps too often, but next time I see it, I'll check out LogCat –  WhiskeyTangoFoxtrot Nov 22 '11 at 20:20
add comment

1 Answer

up vote 4 down vote accepted

You can get 'Insufficient storage space' messages if you don't have enough space on the internal SD card for the market to be able to download the APK into a temp or data directory. When you reboot your phone or exit from certain apps various caches/data directories are cleared, freeing up space on the internal SD card. This is why this error appears 'randomnly' - because as you use and close apps, the amount of disk space changes. There are several apps on the market that can force cache clean ups for you.

'Package file is invalid' can occur if you have disk errors or networking errors that corrupt the downloaded file. This is why this error appears 'randomnly', as SD card file system issues or dropped/bad packets corrupting the file won't occur every time. FYI, SD card file system errors are often a result of not unmounting the phone properly when connecting it via USB or by yanking the SD card from a reader without unmounting it first ("safely remove hardware" in Windows parlance)

share|improve this answer
    
I rarely mount via PC and I don't think I've even ever removed the SD card. –  WhiskeyTangoFoxtrot Nov 23 '11 at 16:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.