"There is not enough storage space on the device to store package" 启动 Android 模拟器时
"There is not enough storage space on the device to store package" when starting Android emulator
我刚刚在 Visual Studio 2015 年更新了 Xamarin(这是 Visual Studio 建议的更新)。
更新后,当我开始使用模拟器AVD_GalaxyNexus_ToolsForApacheCordova (Android 4.4 - API 19)
进行调试时,出现以下错误:
The "InstallPackageAssemblies" task failed unexpectedly.
System.AggregateException: One or more errors occurred. ---> Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> Mono.AndroidTools.InsufficientSpaceException: There is not enough storage space on the device to store package: /data/local/tmp/Mono.Android.Platform.ApiLevel_23.apk. Free up some space or use an SD card and try again.
这不是在更新前几分钟发生的,并且项目在更新期间保持不变。我很确定。
Xamarin 文档记录了这个错误 here,并说:
There is not enough storage space on the device to deploy the package
如果您没有从 Visual Studio 中启动模拟器,就会发生这种情况。在 Visual Studio 之外启动模拟器时,您需要传递 -partition-size 512 选项,例如
emulator -partition-size 512 -avd MonoDroid
但我确实从 Visual Studio.
中启动了模拟器
检查模拟器的内部存储空间大小和可用存储空间。默认配置通常不是很大。
Cobus 的回答对我没有帮助。检查设备的存储空间后,我发现剩余 space 应该足以部署我的应用程序。到目前为止,我唯一的解决方案是每次发生这种情况时都在模拟器中创建新设备。在我多次部署我的应用程序(例如 50 多次部署)后,它一直在发生。
在 MAC 上,如果出现错误,请确保将 dataPartition 增加到 1024M
disk.dataPartition.size : 1024M
在 Mac 当前配置上:如果你的土豆(MacBook pro)比我的更好,请随意添加更多字节
Emulator memory issue
增加堆大小(将其设为 2*x)。
在我的情况下,之前是 256 ,然后在我把它变成 512 之后,现在它工作正常。
venkat Yanamandala 发布
我只是清理解决方案并重新构建它。
我遇到了同样的问题,并通过简单地从 ADB 模拟器卸载以前的版本来设法解决它。卸载:
.运行 模拟器。
.将应用程序的图标拖放到垃圾桶中。
以下这些步骤对我有用
- 增加数据磁盘分区大小1024MB
- 清理并再次重建
我通过清理 android 系统缓存解决了这个问题,Playstore 中有几个工具,我的情况是我正在使用连接的设备进行调试,所以与模拟器无关设置。
我刚刚在 Visual Studio 2015 年更新了 Xamarin(这是 Visual Studio 建议的更新)。
更新后,当我开始使用模拟器AVD_GalaxyNexus_ToolsForApacheCordova (Android 4.4 - API 19)
进行调试时,出现以下错误:
The "InstallPackageAssemblies" task failed unexpectedly.
System.AggregateException: One or more errors occurred. ---> Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> Mono.AndroidTools.InsufficientSpaceException: There is not enough storage space on the device to store package: /data/local/tmp/Mono.Android.Platform.ApiLevel_23.apk. Free up some space or use an SD card and try again.
这不是在更新前几分钟发生的,并且项目在更新期间保持不变。我很确定。
Xamarin 文档记录了这个错误 here,并说:
There is not enough storage space on the device to deploy the package
如果您没有从 Visual Studio 中启动模拟器,就会发生这种情况。在 Visual Studio 之外启动模拟器时,您需要传递 -partition-size 512 选项,例如
emulator -partition-size 512 -avd MonoDroid
但我确实从 Visual Studio.
中启动了模拟器检查模拟器的内部存储空间大小和可用存储空间。默认配置通常不是很大。
Cobus 的回答对我没有帮助。检查设备的存储空间后,我发现剩余 space 应该足以部署我的应用程序。到目前为止,我唯一的解决方案是每次发生这种情况时都在模拟器中创建新设备。在我多次部署我的应用程序(例如 50 多次部署)后,它一直在发生。
在 MAC 上,如果出现错误,请确保将 dataPartition 增加到 1024M
disk.dataPartition.size : 1024M
在 Mac 当前配置上:如果你的土豆(MacBook pro)比我的更好,请随意添加更多字节
Emulator memory issue
增加堆大小(将其设为 2*x)。 在我的情况下,之前是 256 ,然后在我把它变成 512 之后,现在它工作正常。
venkat Yanamandala 发布
我只是清理解决方案并重新构建它。
我遇到了同样的问题,并通过简单地从 ADB 模拟器卸载以前的版本来设法解决它。卸载: .运行 模拟器。 .将应用程序的图标拖放到垃圾桶中。
以下这些步骤对我有用
- 增加数据磁盘分区大小1024MB
- 清理并再次重建
我通过清理 android 系统缓存解决了这个问题,Playstore 中有几个工具,我的情况是我正在使用连接的设备进行调试,所以与模拟器无关设置。