Android Studio Slow and Using Too Much RAM

Share
Ongoing Windows, macOS, Linux Updated November 13, 2026Based on 4 user reportsHow we research

Quick answer

Android Studio's default heap is 1280 MB, so large projects can lag or run out of memory. Raise the IDE and Gradle heap sizes if you have RAM to spare, or trim the load on small machines.

Most likely fix: Increase the IDE heap

How to fix it

Try these in order — the most common fix is first.

  1. 1. Increase the IDE heap

    1. File > Settings > Appearance & Behavior > System Settings > Memory Settings (Android Studio > Settings on macOS)
    2. Raise IDE heap, and the Gradle and Kotlin daemon heaps if you have RAM to spare
    3. Apply and restart; Google warns that allocating too much can also hurt performance
    Did this fix it?
  2. 2. Edit VM options manually

    1. Help > Edit Custom VM Options
    2. Add for example -Xmx4g, save and restart
    Did this fix it?
  3. 3. Exclude folders from antivirus (Windows)

    1. Exclude %USERPROFILE%\.gradle, %USERPROFILE%\AndroidStudioProjects and the Android SDK folder from real-time scanning
    2. Do not disable the antivirus entirely
    Did this fix it?
  4. 4. Tune for low-memory machines

    1. File > Power Save Mode turns off background inspections and auto-compile
    2. Reduce org.gradle.jvmargs in gradle.properties
    3. Uncheck Settings > Build, Execution, Deployment > Compiler > Compile independent modules in parallel
    4. Run on a physical device instead of the emulator
    Did this fix it?
  5. 5. Stop extra daemons

    1. Use the same Gradle version and JDK across projects so daemons are reused
    2. Close unused projects; run ./gradlew --stop to kill idle daemons
    Did this fix it?

Symptoms

Typing lags, indexing runs for minutes, the memory indicator is almost full, or the whole computer slows down.

Why it happens

  • IDE max heap too small for the project (default 1280 MB)
  • Several Gradle and Kotlin daemons running at once
  • Large projects and heavy indexing
  • Emulator running at the same time on a low-RAM machine
  • Antivirus real-time scanning of project and Gradle folders

This guide also covers

  • android studio high ram usage
  • why is android studio so slow
  • android studio memory usage
  • android studio lagging

Still not working?

If Android Studio keeps failing, you're not alone. See every Android Studio problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us
Fixed it? Share this guide

The same problem in other apps

All slow, laggy or resource-hungry guides →

Other Android Studio errors

All 11 Android Studio errors and fixes →