Safi Emile
Safi Emile

Reputation: 21

Error: Out of memory: Java heap space. Configure Gradle memory settings using '-Xmx' JVM option

when in create new project in android studio i get this error

"Out of memory: Java heap space. Configure Gradle memory settings using '-Xmx' JVM option (e.g. '-Xmx2048m'.)

Please fix the project's Gradle settings.

Upvotes: 2

Views: 6884

Answers (1)

M Azam Khan
M Azam Khan

Reputation: 380

In my case Invalidate cache and restart the android studio(which is automatically restarted) then an error will go after restarting the android studio

File-> Invalidate cache/restart-> Invalidate and restart

enter image description here

then enter image description here

I hope you will find the answer... please share your feedback

Upvotes: 2

Related Questions