時「無法保留足夠的空間用於對象堆」我試圖使用Android Studio的0.1搭建實踐一個小項目,但是當我做我的模塊,Android Studio中說:Android的工作室:製作模塊
Android Dex: [(Module Name)] Error occurred during initialization of VM
Android Dex: [(Module Name)] Could not reserve enough space for object heap
我使用Windows 7 64位JDK 1.7,內存爲8GB。我不熟悉Gradle,也不知道如何解決它。我的另一臺幾乎相同的電腦沒有這個問題。
我試圖在bin文件夾中修改studio.exe.vmoptions
,當我設置-Xmx768M時,可以看到右下角改爲742M。但錯誤仍然存在。另外,如果我想設置一個較大的值一樣-Xmx2G
,該studio.bat
顯示:
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
然後在Android工作室剛剛啓動不起來。
有沒有辦法讓我的Android Studio可用?非常感謝你。
與OP相同的問題,沒有解決問題。 – PseudoNinja
@PseudoNinja在我的情況下,我不得不降低'Android DX Compiler'堆內存。默認情況下,它是1024MB,降低到768MB可以正常工作。 –