skip to Main Content

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.

3

Answers


  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.

    Login or Signup to reply.
  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

    Login or Signup to reply.
  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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search