org.gradle.api.ProjectConfigurationException:A problem occurred configuring root project after updated to AndroidStudio - 3.5.3

Updated Android Studio(3.5.3) not building Android Project, before it was building. I have checked with Proxy settings still it is getting same Below are the exceptions after rebuilding the Android Project.

  org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'Gsa2_NewMenu'.
Caused by: org.gradle.api.resources.ResourceException: Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.3.2/gradle-3.3.2.pom'.
    at org.gradle.internal.resource.ResourceExceptions.failure(ResourceExceptions.java:74)
    at org.gradle.internal.resource.ResourceExceptions.getFailed(ResourceExceptions.java:57)
    at org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor.copyToCache(DefaultCacheAwareExternalResourceAccessor.java:201)
    at org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor.access$300(DefaultCacheAwareExternalResourceAccessor.java:55)
    at org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor$1.create(DefaultCacheAwareExternalResourceAccessor.java:90)
    at org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor$1.create(DefaultCacheAwareExternalResourceAccessor.java:82)
    at org.gradle.cache.internal.ProducerGuard$AdaptiveProducerGuard.guardByKey(ProducerGuard.java:97)
    at org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor.getResource(DefaultCacheAwareExternalResourceAccessor.java:82)
    at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.downloadByCoords(DefaultExternalResourceArtifactResolver.java:138)
    at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.downloadStaticResource(DefaultExternalResourceArtifactResolver.java:98)
    at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.resolveArtifact(DefaultExternalResourceArtifactResolver.java:65)
    at org.gradle.api.internal.artifacts.repositories.metadata.AbstractRepositoryMetadataSource.parseMetaDataFromArtifact(AbstractRepositoryMetadataSource.java:69)
    at org.gradle.api.internal.artifacts.repositories.metadata.AbstractRepositoryMetadataSource.create(AbstractRepositoryMetadataSource.java:59)
    at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.resolveStaticDependency(ExternalResourceResolver.java:199)
    at org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver.doResolveComponentMetaData(MavenResolver.java:117)
    at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver$RemoteRepositoryAccess.resolveComponentMetaData(ExternalResourceResolver.java:400)
    at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository$ResolveAndCacheRepositoryAccess.resolveComponentMetaData(CachingModuleComponentRepository.java:381)
    at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingModuleComponentRepository$ErrorHandlingModuleComponentRepositoryAccess.resolveComponentMetaData(ErrorHandlingModuleComponentRepository.java:136)
    ... 133 more
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.3.2/gradle-3.3.2.pom'.
    at org.gradle.internal.resource.transport.http.HttpClientHelper.performRequest(HttpClientHelper.java:96)
    at org.gradle.internal.resource.transport.http.HttpClientHelper.performRawGet(HttpClientHelper.java:80)
    at org.gradle.internal.resource.transport.http.HttpClientHelper.performGet(HttpClientHelper.java:84)
    at org.gradle.internal.resource.transport.http.HttpResourceAccessor.openResource(HttpResourceAccessor.java:43)
    at org.gradle.internal.resource.transport.http.HttpResourceAccessor.openResource(HttpResourceAccessor.java:29)
    at org.gradle.internal.resource.transfer.DefaultExternalResourceConnector.openResource(DefaultExternalResourceConnector.java:56)
    at org.gradle.internal.resource.transfer.ProgressLoggingExternalResourceAccessor.openResource(ProgressLoggingExternalResourceAccessor.java:36)
    at org.gradle.internal.resource.transfer.AccessorBackedExternalResource.withContentIfPresent(AccessorBackedExternalResource.java:130)
    at org.gradle.internal.resource.BuildOperationFiringExternalResourceDecorator$11.call(BuildOperationFiringExternalResourceDecorator.java:237)
    at org.gradle.internal.resource.BuildOperationFiringExternalResourceDecorator$11.call(BuildOperationFiringExternalResourceDecorator.java:229)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:350)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:340)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:120)
    at org.gradle.internal.resource.BuildOperationFiringExternalResourceDecorator.withContentIfPresent(BuildOperationFiringExternalResourceDecorator.java:229)
    at org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor.copyToCache(DefaultCacheAwareExternalResourceAccessor.java:199)
    ... 148 more
Caused by: java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method)

Below is the app gradle file.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion '28.0.3'
    defaultConfig {
        applicationId "XX.XX.XXX"
        minSdkVersion 22
        targetSdkVersion 26
        versionCode 13
        versionName "6.0"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

repositories{
    maven { url "jitpack.io" }
    maven { name 'glide-snapshot'; url 'oss.sonatype.org/content/repositories/snapshots' }
    mavenCentral()
}

dependencies {
    /*implementation fileTree(include: ['*.jar'], dir: 'libs')
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })*/
    implementation files('libs/apache-httpcomponents-httpclient.jar')
    implementation files('libs/apache-httpcomponents-httpcore.jar')

    implementation files('libs/commons-codec-1.11.jar')
    implementation 'com.android.support:appcompat-v7:27.1.0'
    implementation 'com.android.support:design:27.1.0'
    implementation 'com.journeyapps:zxing-android-embedded:3.4.0'
    implementation 'com.android.support:cardview-v7:27.1.0'
    implementation 'com.google.android.gms:play-services-location:11.0.4'
    implementation 'com.google.firebase:firebase-messaging:11.0.4'
    implementation 'com.jakewharton.timber:timber:4.5.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'

    implementation 'com.android.support:support-v4:27.1.0'
    implementation 'com.github.bumptech.glide:glide:4.9.0'
    implementation 'me.dm7.barcodescanner:zxing:1.8.4'
    implementation 'com.loopj.android:android-async-http:1.4.9'
    implementation 'com.google.code.gson:gson:2.6.2'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.github.antonKozyriatskyi:CircularProgressIndicator:1.3.0'

    implementation 'com.google.code.gson:gson:2.6.2'
    implementation 'com.squareup.retrofit2:retrofit:2.0.2'
    implementation 'com.squareup.retrofit2:converter-gson:2.0.2'
    implementation 'com.android.support:recyclerview-v7:27.1.0'


    implementation(name:'merchantsdk', ext:'aar')
    implementation(name:'ezetapandroidsdk', ext:'aar')

    testImplementation 'junit:junit:4.12'
    implementation files('libs/org.apache.commons.io.jar')
}


apply plugin: 'com.google.gms.google-services'

Below is the Project build gradle file

buildscript {
    repositories {

        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.google.gms:google-services:3.0.0'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url 'https://jitpack.io'
        }
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }

        flatDir {
            dirs 'libs'
        }
    }
}

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

I have checked online, but none worked.I am stuck from 4 days, Please check my App and Project gradle files and let me know.Please help me on this.Thanks in Advance.


Can you try changing sequence from:

FROM:

buildscript {
    repositories {

        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
        google()
    }

TO:

buildscript {
        repositories {
                google()
                jcenter()
           maven {
                url 'https://maven.google.com/'
                name 'Google'
            }
        mavenCentral()


        }

Then ReSync Project

Android Studio 3.0 is failing to build with Gradle 4.2.1, api.ProjectConfigurationException: A problem occurred configuring root project ' AppiumTest2'. at org.gradle.configuration.project. problem. org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'. how to diagnose (in android studio 3.2.1) click on Build tab on bottom toolbar click on Build tab (next to Sync tab) at the top of the panel that appears


use this link and classpath 'com.android.tools.build:gradle:3.5.2' used

https://developer.android.com/studio/releases/gradle-plugin

failed gradle in building android project � Issue #2860 � gradle/gradle , I build really sample android project on android studio and when I build the ProjectConfigurationException: A problem occurred configuring root project getFiles(Unknown Source) at org.gradle.api.internal.initialization. Ao gerar o build está simulando um erro: A problem occurred configuring root project org.gradle.internal.exceptions.LocationAwareException: A problem occurred configuring root project 'XXXXXZ'.


Your configuration looks messed up. New projects created using Android Studio 3.0 and higher also includes Google's Maven repository by using google(). There's no point of using,

maven {
    url 'https://maven.google.com/'
    name 'Google'
}

According to the official documentation your top-level build.gradle file should look like this,

 buildscript {

        repositories {
            google()
            jcenter()
        }

        dependencies {
            classpath 'com.android.tools.build:gradle:3.5.3'
            classpath 'com.google.gms:google-services:3.0.0'
        }
    }  

    allprojects {
       repositories {
           google()
           jcenter()
           maven {
            url 'https://jitpack.io'
          }
       }
    }

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

Also, you are using an old version of gradle wrapper. I suggest you change the gradle-wrapper.properties with the following configuration:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

Faced with `org.gradle.api.ProjectConfigurationException` error on , Learn more org.gradle.api.ProjectConfigurationException:A problem occurred configuring root project after updated to AndroidStudio - 3.5.3. A problem occurred� Please don't tag questions with the android-studio tag just because you use it: the Android Studio tag should only be used when you have questions about the IDE itself, and not any code you write (or want to write) in it.


That is most likely a wrong network configuration.

This answer might help you: Could not resolve com.android.tools.build:gradle:3.3.2

If none of this works try to reinstall Android Studio: How to completely uninstall Android Studio from windows(v10)?

Good luck!

Updated AndroidStudio(3.5.3) not building Android Project, Caused , Below are the exceptions after rebuilding the Android Project. org.gradle.api. ProjectConfigurationException: A problem occurred configuring root� A problem occurred configuring project ':app'. > Could not resolve all dependencies for configuration ':app:_debugCompile'. > Could not find any version that matches com.android.support:support-v4:19.+.


New features in Android Studio Preview, If you encounter any problems using a preview version of Android Studio, please let us know. for Android Gradle plugin can help you update the AGP version for your project. after a process disconnects, making it easier to debug your app after a crash. When a disconnect occurs, the Database Inspector downloads your � Executing tasks: [:app:assembleDebug] Configuration on demand is an incubating feature. FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':app'. > A problem occurred configuring project ':volley'. > Could not resolve all dependencies for configuration ':volley:classpath'.


Android Gradle plugin release notes, The Android Studio build system is based on Gradle, and the Android Gradle plugin adds The plugin version applies to all modules built in that Android Studio project. This minor update supports compatibility with new default settings and After Android Studio finishes building your project, click the Build Analyzer tab.


(SOLVED) A problem occurred configuring project ':app'., api.ProjectConfigurationException: A problem occurred configuring root project ' MyApplication'. at org.gradle.configuration.project.