2

since the day I updated my Android Studio to new version, it is downloading huge amount of data for each new project or on each import of project. It downloads gradle versions and downloads files from jcenter.bintray.com. If I provide manual gradle address in settings-> Build -> Gradle -> Gradle Home then it give error in build which I quoted here. I have to download this amount of data each time. Please tell me how to get rid of it and work on projects without Internet.

Unknown host 'jcenter.bintray.com'. You may need to adjust the proxy settings in Gradle.
Enable Gradle 'offline mode' and sync project
Learn about configuring HTTP proxies in Gradle

If I select offline mode in settings, it gives this error:

Could not download gradle-core.jar (com.android.tools.build:gradle-core:2.3.3): No cached version available for offline mode
Surraya Marvi
  • 131
  • 1
  • 11

1 Answers1

0

I have to download this amount of data each time. Please tell me how to get rid of it and work on projects without Internet

It will need to download some packages-libraries-meta-datas for the first time. Without internet, we can download some files like gradle-core.jar or the gradle as mentioned here and then adding them to the needed directory but, you'll need internet for adding dependencies or etc.

Use internet for downloading the packages for the first time.

If I select offline mode in settings, it gives this error: Could not download gradle-core.jar (com.android.tools.build:gradle-core:2.3.3): No cached version available for offline mode

Obviously, there is not any cached version of gradle-core.jar and which means, it will need to download from internet and after that, you won't need to download them again.

Anyways, to avoid that error, make sure you have jcenter() or add it like this in your root build.gradle repositories:

repositories {
    google()
    jcenter { url "http://jcenter.bintray.com/" }
    ...
ʍѳђઽ૯ท
  • 16,646
  • 7
  • 53
  • 108