您的位置:首页 > 移动开发 > Android开发

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

2014-12-23 18:36 741 查看
运行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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: