close

[Solved] How to fix gradle build error A problem occurred configuring root project?

Hello Guys, How are you all? Hope You all Are Fine. Today I am facing the following error How to fix gradle build error A problem occurred configuring root project? in Java. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How to fix gradle build error A problem occurred configuring root project Error Occurs?

Today I am facing the following error How to fix gradle build error A problem occurred configuring root project? in Java.

How To Solve fix gradle build error A problem occurred configuring root project Error ?

  1. How To Solve fix gradle build error A problem occurred configuring root project Error ?

    To Solve fix gradle build error A problem occurred configuring root project Error If so, try to disable it for a brief moment and test again. If it works, you might want to add Android Studio to your firewall whitelist.

  2. How to fix gradle build error A problem occurred configuring root project?

    To Solve fix gradle build error A problem occurred configuring root project Error If so, try to disable it for a brief moment and test again. If it works, you might want to add Android Studio to your firewall whitelist.

Solution 1

The very first thing I’d guess, there might be a Firewall blocking the connection of Android Studio.

If so, try to disable it for a brief moment and test again. If it works, you might want to add Android Studio to your firewall whitelist.

Solution 2


Note that

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

and

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

are different, you should also put google() to top for buildscript {repositories { } }: i.e.

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

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read