简体   繁体   English

安装错误:INSTALL_FAILED_INSUFFICIENT_STORAGE

[英]Installation errors: INSTALL_FAILED_INSUFFICIENT_STORAGE

I tried many methods to fix Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE but until now, I can increase my intern storage memory. 我尝试了很多方法来修复Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE但是到现在为止,我可以增加实习存储内存。

The method I tried: 我试过的方法:

  1. Right click the root of your Android Project, go to "Run As" then go to "Run Configurations..." locate the "Android Application" node in the tree at the left, then select your project and go to the "Target" tab on the right side of the window look down for the "Additional Emulator Command Line Options" field (sometimes you'll need to make the window larger) and finally paste "-partition-size 1024" there. 右键单击Android项目的根目录,转到“运行方式”,然后转到“运行配置...”,找到左侧树中的“Android应用程序”节点,然后选择您的项目并转到“目标”窗口右侧的选项卡向下看“附加模拟器命令行选项”字段(有时您需要使窗口变大),最后在那里粘贴“-partition-size 1024”。 Click Apply and then Run to use your emulator. 单击“应用”,然后单击“运行”以使用模拟器。

  2. Go to Eclipse's Preferences, then Select “Launch” Add “-partition-size 1024” on the “Default emulator option” field, then click “Apply” and use your emulator as usual. 转到Eclipse的首选项,然后选择“启动”在“默认模拟器选项”字段中添加“--partition-size 1024”,然后单击“应用”并像往常一样使用模拟器。

  3. Open your .Android directory. 打开.Android目录。 Usually in your home directory. 通常在您的主目录中。 Then go to avd and then open the directory that has the name of the avd you would like to change. 然后转到avd,然后打开具有您想要更改的avd名称的目录。

  4. Now edit the config.ini file and add the following line or modify the following line: disk.dataPartition.size=1024 现在编辑config.ini文件并添加以下行或修改以下行: disk.dataPartition.size=1024

This all worked for me in Linux. 这在Linux中对我有用。

I used my app to store in external storage by using this: 我使用我的应用程序存储在外部存储中:

android:installLocation="preferExternal" 

but then I received 但后来我收到了

Installation error: INSTALL_FAILED_MEDIA_UNAVAILABLE 安装错误:INSTALL_FAILED_MEDIA_UNAVAILABLE

Error 错误

Installation error: INSTALL_FAILED_MEDIA_UNAVAILABLE

means that your device does not have SD card. 表示您的设备没有SD卡。

Error 错误

Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE

means that you don't have enough space on device for your app. 表示您的应用在设备上没有足够的空间。

You should do next: 你应该做下一个:

  1. Write android:installLocation="auto" and android itself will care where to install your app - internal or external memory. android:installLocation="auto"和android本身将关心安装你的应用程序的位置 - 内部或外部内存。
  2. Be sure that device has enough memory for installing (usually it is more then size of apk). 确保设备有足够的内存进行安装(通常它的大小超过apk)。
  3. If your app really need much space - read this guide . 如果您的应用确实需要太多空间 - 请阅读本指南
  4. If you use emulator - setup sd card support: 如果您使用模拟器 - 安装SD卡支持: 在此输入图像描述

Try with these options, with that configuration I'm able to install one app of 23MB: 尝试使用这些选项,使用该配置我可以安装一个23MB的应用程序: 在此输入图像描述

Try uninstalling apps that are installed on emulator and not inbuilt. 尝试卸载安装在模拟器上但未内置的应用程序。 you can also change the size of SD card by editing emulator settings but then it will take time to run your app as that much memory needs to be converted into a mountable partition. 您还可以通过编辑模拟器设置来更改SD卡的大小,但随后需要时间来运行您的应用程序,因为需要将大量内存转换为可安装的分区。

I have also had a similar problem when I run my app. 当我运行我的应用程序时,我也遇到了类似的问题。 In my Google TV emulator, it does not show USB storage for external storage. 在我的Google TV模拟器中,它不会显示外部存储的USB存储空间。 Try to increasing the cache memory and ram size in a emulator new hardware. 尝试在模拟器新硬件中增加缓存和ram大小。

How to increase virtual memory of emulator: 如何增加模拟器的虚拟内存:

\\emulator -avd "Emulator Name" -partition-size 500

After that, try to install your apk. 之后,尝试安装你的apk。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM