Android Studio Gradle Sync Failed

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

Quick answer

Gradle sync fails when the JDK, Gradle, Android Gradle plugin (AGP) or network setup does not match. Check the real error in the Build tab, then fix the Gradle JDK or versions, and re-sync.

Most likely fix: Read the actual error first

How to fix it

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

  1. 1. Read the actual error first

    1. Open the Build tool window (View > Tool Windows > Build) after the failed sync
    2. Click the first error line, not the generic 'sync failed' banner
    3. Search for the exact message; the cause is usually a JDK, version or network error
    Did this fix it?
  2. 2. Set the correct Gradle JDK

    1. Open File > Settings > Build, Execution, Deployment > Build Tools > Gradle (Android Studio > Settings on macOS)
    2. Set Gradle JDK to GRADLE_LOCAL_JAVA_HOME or the bundled jbr-17 (AGP 8.x needs 17)
    3. Click Apply, then Sync Project with Gradle Files
    Did this fix it?
  3. 3. Check repositories and offline mode

    1. In settings.gradle(.kts), make sure pluginManagement and dependencyResolutionManagement list google() and mavenCentral()
    2. In the Gradle settings page, make sure Offline mode is unchecked
    3. Re-sync
    Did this fix it?
  4. 4. Fix network or proxy blocks

    1. Settings > Appearance & Behavior > System Settings > HTTP Proxy: set your proxy or auto-detect
    2. For 'Permission denied: connect', add -Djava.net.preferIPv4Stack=true to org.gradle.jvmargs in gradle.properties and restart Android Studio
    3. Sync again
    Did this fix it?
  5. 5. Clear caches

    1. File > Invalidate Caches > Invalidate and Restart
    2. If it still fails, close the IDE and delete the project's .gradle and build folders, then reopen and sync
    Did this fix it?

Symptoms

A red 'Gradle sync failed' banner or 'Gradle project sync failed' message in the Build tool window, often with an unresolved dependency or plugin error.

Why it happens

  • Gradle JDK older than what the Android Gradle plugin requires (AGP 8.x needs JDK 17)
  • AGP, Gradle and Android Studio versions that are not compatible
  • Missing google() or mavenCentral() repository
  • Proxy, firewall or IPv6 problems blocking dependency downloads
  • Corrupt Gradle cache or stale IDE caches

This guide also covers

  • gradle sync failed android studio
  • android studio gradle project sync failed
  • android studio sync failed fix

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 sync failures guides →

Other Android Studio errors

All 11 Android Studio errors and fixes →