Computer Science, asked by Anonymous, 9 months ago

What to do when android studio shows gradle sync error. Please dont write rubish

Answers

Answered by Prabesh25
1

Answer:

What to do when android studio shows gradle sync error.

Results in English

Featured snippet from the web

Load your project in Android Studio and go to File->Settings->Gradle.

...

2

Goto File -> Invalidate caches / Restart.

Shutdown Android Studio.

Rename/remove .gradle folder in the user home directory.

Restart Android Studio (It will download gradle metadata and data)

Gradle build succeed.

Rebuild project. Done

Answered by dhammajyothivoja27
0

Answer:

  1. Goto File -> Invalidate caches / Restart
  2. Shutdown Android Studio
  3. Rename/remove .gradle folder in the user home directory
  4. Restart Android Studio (It will download gradle metadata and data)
  5. Gradle build succeed
  6. Rebuild project. Done.

1

Make sure your gradle is not in offline mode, it's under Preferences/Build, Execution, Deployment/Gradle and there you will see a Offline work (mostly used when you are working remotely where there is no internet) – Matthieu Smith

1

Invalidate caches / Restart was enough to fix not only the Gradle sync issue, but also an inability to upgrade from 3.1.2 to 3.3. Thank you! – Scott Ventura

in some countries you most use vpn. for enable android studio auto-detect proxy settings go to: "File | Settings | Appearance & Behavior | System Settings | HTTP Proxy" and check "auto-detect proxy settings" . – mrdm

Your instructions are a bit confusing. Why would you invalidate caches / Restart if your just going to shut it down, and if android studio is shut down when you remove .gradle then how can you restart. Would it be Invalidate caches -> Shutdown android studio -> remove .gradle -> start android studio? –

Explanation:

I hope it's helpful....

Similar questions