Android Emulator - No space left on device
I got this error message when trying to run my app in the Android 1.6 emulator.
[ERROR] /Developer/android-sdk/tools/adb failed to copy '/Developer/Appcelerator/Olsson/build/android/bin/app.apk' to '/data/local/tmp/app.apk': No space left on device
Anyone else got this error and found away to solve it?
6 Answers
-
David
If your app is large and so you really need a virtual device with a lot of storage, you can amend the one that Titanium has created, using the android virtual device manager. To do this:
- close all emulators and Titanium Developer
- run
android
at the command line - choose the "virtual devices" category on the left
- press the "new" button
- create a new device, with exactly the same name as the one created by Titanium (it will have a prefix of "titanium_")
- set a size, ie 512
- set the built-in skin (which you will choose on Titanium's "Run Emulator" screen), ie "WVGA800"
- ensure that "Override the existing AVD with the same name" is ticked
- press "Create AVD"
Now you will see that the AVD image in /path/to/$YOUR_HOME_DIR/.android/avd/$AVD_NAME/sdcard.img will be roughly the size you set.
See this screenshot for an example:
-
I followed this answer and it did the trick. Hope somebody finds it helpful.
-
David
Are you certain that you need 1.6? I always select "APIs 2.2". See this screenshot:
-
This issue is caused in several forms but there are generally only two underlying causes.
1) the emulator is actually too full to copy the new .apk
2) there is not enough room to unpack the new .apk to do the install.
Simply uninstall one or more of your applications on the emulator and you should be able to push successfully again.
-
Thanks for the answers!
I have removed the .android folder and reinstalled the android-sdk with 1.6 and 2.2.
The "No space left on device" is now gone.Now I get this instead: [ERROR] Failed installing com.xxx.xxx: pkg: /data/local/tmp/app.apk
I have tried running in both APIs 1.6 and APIs 2.2 but with no success.
-
David
Removing the .android folder is fine and will solve your issue, but bear in mind it may be temporary if your applications need more space than is provided in the default device image that Titanium creates. On my system this seems to be about 55MB. Your app of 19MB plus the OS and default apps may well be approaching this capacity.
If I were you, I would delete everything relating to android in /data/local/tmp. Thus, on my system, I would remove:
/tmp/android /tmp/adb.log