android模拟器错误No space left on device解决方法

来源:互联网 发布:消失的夫妻后续知乎 编辑:程序博客网 时间:2024/05/15 23:53

运行apk加载到模拟器时出现下面错误:

Failed to install hello.apk on device 'emulator-5554': No spaceleft on device
com.android.ddmlib.SyncException: No space left on device
Launch canceled!

重启eclipse和模拟器无效,修改模拟器的sd卡和heap大小无效,删除模拟器重新建立也不行。

经查阅网上的资料发现:原来apk应用的大小超出了android支持的最大限度,由于在drawable中加入过大的视频和图片等导致的,如果不是apk本身需要带的视频或图片的话,最好把资源放到SD卡里,删掉这些过大的资源后正常了。

Google市场对apk大小的限制为:

APK file size: Maximum supported size is 50MB.

 

网上搜到的解决方法:

http://stackoverflow.com/questions/3536463/android-application-apk-maximum-size

http://stackoverflow.com/questions/3584297/installing-application-on-sd-card-in-android-sdk-2-2

 

The reason you are getting that error is that, after the androidos takes the needed ram out of those 192MB, the "app size ram" isnot enough to hold that 50+mb application.

I thought that installLocation would install directly to SD, butthat is not the case.

0 0