Mystery
Mystery

Reputation: 1

Android Studio: Out of memory: Java heap space

Out of memory: Java heap space. Please assign more memory to Gradle in the project's gradle.properties file. For example, the following line, in the gradle.properties file, sets the maximum Java heap size to 1,024 MB: org.gradle.jvmargs=-Xmx1024m

I have tried everything on the web. The same problem keeps coming up. I have changed the gradle.properties file to 2g. Added largeHeap = true in Manifest file. I am not even trying to run in using AVD. I am using a physical phone. Could someone please help?

Upvotes: 0

Views: 1795

Answers (2)

Mystery
Mystery

Reputation: 1

I reinstalled Android Studio and everything's back to normal. Thank you everyone for all the help!

Upvotes: 0

mvee
mvee

Reputation: 293

Try the solution at the link below to upgrade the heap size in Android Studio.

https://stackoverflow.com/a/28738237/3059314

Upvotes: 0

Related Questions