{"id":1727,"date":"2016-04-10T23:08:32","date_gmt":"2016-04-10T15:08:32","guid":{"rendered":"http:\/\/www.51cos.com\/?p=1727"},"modified":"2016-04-10T23:14:46","modified_gmt":"2016-04-10T15:14:46","slug":"android-studio%e6%89%93%e5%bc%80%e5%b7%a5%e7%a8%8b%e6%8f%90%e7%a4%baerror-occurred-during-initialization-of-vm-could-not-reserve-enough-space-for-object-heap-could-not-create-the-java-virtual-machine","status":"publish","type":"post","link":"http:\/\/www.51cos.com\/?p=1727","title":{"rendered":"Android Studio\u6253\u5f00\u5de5\u7a0b\u63d0\u793aError occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine.\u7684\u7ec8\u6781\u89e3\u6cd5"},"content":{"rendered":"<p>Android Studio\u6253\u5f00\u5de5\u7a0b\u63d0\u793a\u201cError occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine.\u201d\u7684\u7ec8\u6781\u89e3\u6cd5<\/p>\n<p>&nbsp;<\/p>\n<p>For Android Studio 1.3 : (Method 1)<\/p>\n<p>Step 1 : Open <strong>gradle.properties<\/strong> file in your Android Studio project.<\/p>\n<p>Step 2 : Add this line at the end of the file<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"prettyprint linenums\" >\norg.gradle.jvmargs=-XX\\:MaxHeapSize\\=256m -Xmx256m<\/p>\n<p><span style=\"color: #ff6600;\">Above methods seems to work but if in case it won't then do this (Method 2)<\/span><\/p>\n<p><span style=\"color: #ff6600;\">Step 1 : Start Android studio and close any open project (<strong>File &gt; Close Project<\/strong>).<\/span><\/p>\n<p><span style=\"color: #ff6600;\">Step 2 : On Welcome window, Go to <strong>Configure &gt; Settings<\/strong>.<\/span><\/p>\n<p><span style=\"color: #ff6600;\">Step 3 : Go to <strong>Build, Execution, Deployment &gt; Compiler<\/strong><\/span><\/p>\n<p><span style=\"color: #ff6600;\">Step 4 : <strong>Change Build process heap size (Mbytes) to 1024<\/strong> and <strong>Additional build process to VM Options to -Xmx512m<\/strong>.<\/span><\/p>\n<p><span style=\"color: #ff6600;\">Step 5 : Close or <strong>Restart Android Studio<\/strong>.<\/span><\/p>\n<p><a href=\"http:\/\/www.51cos.com\/wp-content\/uploads\/2016\/04\/8b7ab5811ab8eef16afcc50e033c1af7.png\"><img decoding=\"async\" src=\"http:\/\/www.51cos.com\/wp-content\/uploads\/2016\/04\/8b7ab5811ab8eef16afcc50e033c1af7.png\" alt=\"SOLVED - Andriod Studio 1.3 Gradle Could not reserve enough space for object heap Issue\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Android Studio\u6253\u5f00\u5de5\u7a0b\u63d0\u793a\u201cError occurred during initializati [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-1727","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts\/1727","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1727"}],"version-history":[{"count":2,"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts\/1727\/revisions"}],"predecessor-version":[{"id":1730,"href":"http:\/\/www.51cos.com\/index.php?rest_route=\/wp\/v2\/posts\/1727\/revisions\/1730"}],"wp:attachment":[{"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1727"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1727"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.51cos.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1727"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}