0

enter image description heremy gradle.build contains

buildscript {

repositories {
    google()
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.1.0'


    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

allprojects {
repositories {
    google()
    jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

and upon syncing project with gradle files is showing error as connection refused:connect . There is a problem with Apply script build.gradle Not able to resolve dependencies of classpath

Log file showing the below error

Caused by: org.gradle.internal.resource.transport.http.HttpRequestException: Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.0/gradle-3.1.0.pom'.
at org.gradle.internal.resource.transport.http.HttpClientHelper.performRequest(HttpClientHelper.java:96)
priyanka hj
  • 79
  • 1
  • 2
  • 11

2 Answers2

0

Try using invalidate caches and restart in File Menu. Most of the time it works when studio have a new update.

Pratik Powar
  • 251
  • 1
  • 4
  • 14
0

Goto "File > Project Structure > SDK Location" menu and Check "Use embedded JDK(recommended)". It may be your JDK version problem.