2

Could not resolve all artifacts for configuration ':classpath'. : Could not resolve com.android.tools.build:gradle:3.6.1.

Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: No cached version of com.android.tools.build:gradle:3.6.1 available for offline mode.

I upgraded Android Studio to 5.6.1 and it refused to sync. It started when I upgraded Android Studio.

ff10
  • 3,046
  • 1
  • 32
  • 55
sideeq12
  • 21
  • 1
  • 3

2 Answers2

8

In Android Studio 3.6.1 you can't find offline mode in setting and you need to find gradle in View-> Tool Windows-> gradle and you should press Toggle Offline Mode button.

enter image description here

Anice Jahanjoo
  • 7,088
  • 3
  • 20
  • 29
0

I m using android studio 4.0.1.I had the same issue so maybe I can help.u just need to turn off toggle button. Click alt+shift+a. Then u will see that toggle option. You can also go to view->tool windows->gradle Then click gradle .now you can see the toggle. See if toggle is in offline mode .if it is then just press the toggle again n sync .try this hope it will work.

Paraja
  • 1
  • 1