0

First of all I want to say that its my first time to work with Android Studio so I don't know much about it.

What I am trying to do:

I am trying to setup Android Studio in offline mode because I have a very slow connection.

What I have done:

  1. Downloaded and installed Android Studio 3.2.1
  2. Downloaded and setup Android Sdk ( By specifying the path to sdk in Sdk Manager )
  3. Downloaded and setup Gradle 4.6

    • Pasted gradle-4.6 folder inside C:/Users/Username/.gradle/wrapper/dists/
    • Set Global gradle settings to Offline work
    • Set Use local gradle distribution to C:/Users/Username/.gradle/wrapper/dists/gradle-4.6
    • Altered distributionUrl variable of gradle-wrapper-properties file to file:///C:/Users/Username/.gradle/wrapper/dists/gradle-4.6

What Is the problem:

Whenever I try to built and sync my project I get the following error:

No cached version of com.android.tools.build:gradle:4.6 available for offline mode.  

I have looked at these posts:

Download and install Android studio gradle offline

No cached version… available for offline mode.

None of them fixed the problem. Please help.

Ahtisham
  • 9,170
  • 4
  • 43
  • 57

1 Answers1

0

Let complete your gradle build in online mode once, After that change the setting to offline mode, then it will work, until you add new dependencies or try to fetch anything from internet. try it may be it will work. Or you can change Use Gradle from and locate to gradle file that you have downloaded picture

Vaibhav
  • 72
  • 8