0

I'm trying to use Android Studio offline because in the place I work, IT policy doesn't allow me to download .jar or .zip or some similar files though I can request the files which I want to download from IT team. I tried to create a hello world project offline but gradle didn't synchronised so I couldn't even run a simple project. Here are the things I tried for running android studio offline;

  • I downloaded gradle version 7.2 complete build from official website,

  • Specified Gradle location using the menu File --> Settings --> Build, .. --> Gradle,

  • Choose version 7.2. for both Android Gradle plugin and Gradle versions in File --> Project Structure --> Project menu.

  • Added the zip of gradle version 7.2 to gradle-wrapper.properties as;

...
distributionUrl=file\:/gradle-7.2-all.zip
...

At the end of all of the steps above, I still get connection errors.

Here is the error I got;

Could not resolve all artifacts for configuration ':classpath'.
Could not download gradle-7.2.0.jar (com.android.tools.build:gradle:7.2.0): No cached version available for offline mode

... (around 80 more jar files)

Possible solution:
Disable offline mode and rerun the build

It's third day and I couldn't even started to write a line of code. Could you please help me out?

  • When working in offline more gradle uses the already downloaded plugins and dependencies, so at least once you need to download them. If your IT policy disallows downloading of files, this is a fundamental problem for Android development. You should ask your IT if you can get a second PC just for development purpose that as a bit more relaxed IT policy but is separated from the core network. – Robert May 17 '22 at 16:25
  • Thanks! At least It's good to know that it is impossible to start coding fully offline. – hcelalaydin May 18 '22 at 08:20

0 Answers0