性能使用Hyper-V在Android Studio中构建

时间:2022-12-04 20:50:32

This is a very general question for anyone who uses a virtual machine to build android stuff. I'm running Windows 8.1 64-bit in a Hyper-V VM with 2 cores and 2 gigs of RAM dedicated to the VM (which I could expand if necessary). All that is installed on it is Android Studio (for complicated/unknown reasons, I can't run it on my main image). It works fine except that build times are in the minutes instead of seconds like I'm used to. It's really slowing down my development (I'm still just learning, so I make a lot of mistakes that require rebuilds).

对于使用虚拟机构建android内容的任何人来说,这是一个非常普遍的问题。我在Hyper-V VM中运行Windows 8.1 64位,其中2个内核和2个专用于VM的RAM(如果需要,我可以扩展)。所有安装在它上面的是Android Studio(出于复杂/未知的原因,我不能在我的主图像上运行它)。它工作正常,除了构建时间是在几分钟而不是像我习惯的秒。它确实减慢了我的开发速度(我还在学习,所以我犯了许多需要重建的错误)。

Does anyone have any tips for optimizing Hyper-V or Android Studio builds that might cut my build times down (they range from 3 minutes minimum up to 12 minutes for a VERY simple app)?

有没有人有任何优化Hyper-V或Android Studio版本的技巧可能会缩短我的构建时间(对于非常简单的应用程序,它们的最小值为3分钟至12分钟)?

Thanks in advance, and apologies about the extremely general question!

在此先感谢,并对非常笼统的问题道歉!

1 个解决方案

#1


If you don't require all the windows 8.1 features in the android development environment, then install Microsoft Server 2012 instead and then install additional required features only. It will improve the performance and speed dramatically.

如果您不需要Android开发环境中的所有Windows 8.1功能,请安装Microsoft Server 2012,然后仅安装其他必需功能。它将显着提高性能和速度。

#1


If you don't require all the windows 8.1 features in the android development environment, then install Microsoft Server 2012 instead and then install additional required features only. It will improve the performance and speed dramatically.

如果您不需要Android开发环境中的所有Windows 8.1功能,请安装Microsoft Server 2012,然后仅安装其他必需功能。它将显着提高性能和速度。