'Error creating a new project on Android Studio (Bumblebee 2021.1.1 Patch 2)

when I try to create a new project on Android Studio (Bumblebee 2021.1.1 Patch 2), I get this error:

enter image description here

Here is my gradle-wrapper.properties:

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

and my settings.gradle :

pluginManagement {
    repositories {
        gradlePluginPortal()
        google()
        mavenCentral()
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
    }
}

rootProject.name = "TestProject"
include ':app'

Could anyone help me solve this problem? I am completely paralyzed due to this error and have tried all the other solutions found in StackOverflow and elsewhere, but all in vain.



Solution 1:[1]

Make sure you are connected to the internet and to the steps as Picture is shown below. If this doesn't solve your problem, please do let me know.

Step - File --> Sync Project with Gradle Files

enter image description here

Thank you.

Solution 2:[2]

@Talia Your settings.gradle file should look like,

  pluginManagement {
        repositories {
            gradlePluginPortal()
            google()
            mavenCentral()
        }
    }
    dependencyResolutionManagement {
        repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
        repositories {
            google()
            mavenCentral()
        }
    }
        
    rootProject.name = "My Application"
    include ':app'

Replace with above and set your project name as rootProject.name

Solution 3:[3]

Downgrade from 7.1.2 to 7.0.2 Helped me.

id 'com.android.application' version '7.0.2' apply false

id 'com.android.library' version '7.0.2' apply false

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Lalrem Lian B Tlung
Solution 2 Jinal Patel
Solution 3 Igor Fesenko