Read time out on build application

When I create Android project in Android Studio 3.1.2, I am getting the following errors:

read time out

and

org.gradle.api.resources.resource exception : could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.1.2/builder-3.1.2.jar'

I download this file with browser.

How can I install manually? How can I stop downloads for any project and download one time for all project?

Note: I am using hot spot shield and then I am creating a project.

3 answers

  • answered 2018-05-16 06:13 Abhishek

    Try this

    Go to build.gradle file which is at same level of your app folder. Inside you will get dependencies section just add

    classpath 'com.android.tools.build:gradle:2.3.3'

    as shown in below image

    enter image description here

  • answered 2018-05-16 06:18 Vivek Shah

    It is Gradle issue nothing else , Delete your Gradle file and build your project again .

  • answered 2018-05-16 06:25 Android Team

    Try to update app level project gradle file.

    buildscript {
    
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.0'
    
    }
    }
    allprojects {
    repositories {
        google()
        jcenter()
    }
    }
    
    task clean(type: Delete) {
    delete rootProject.buildDir
    }