简体   繁体   English

在Android Studio中运行Android应用程序时出现Java堆空间错误

[英]Java Heap Space error while running Android app in Android Studio

I am a newbie to Android Studio . 我是Android Studio的新手。 When I try to run a sample Android app I am getting the following error : 当我尝试运行示例Android应用程序时,出现以下错误:

Error:Java heap space Please assign more memory to Gradle in the project's gradle.properties file.

I have changed the following in the studio.vmoptions file in bin 我在bin中的studio.vmoptions文件中更改了以下内容

-Xms512m -Xms512m

-Xmx1024m -Xmx1024m

But changing to the above values also doesn't help. 但是更改为上述值也无济于事。

Can anyone guide me step by step what to do. 谁能一步一步指导我该怎么做。

There is possibly an infinite loop in your code using up all the virtual memory, try checking any loops or recursive function calls. 您的代码中可能存在无限循环,耗尽了所有虚拟内存,请尝试检查任何循环或递归函数调用。 Or you can post your code or part of it to help you out better 或者,您可以发布您的代码或部分代码以帮助您更好地工作

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

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