You must specify a URL for a Maven repository

I am trying to build my old project using capacitor… I have updated all my depedencies but when I run the project I am facing below issue

Caused by: org.gradle.api.InvalidUserDataException: You must specify a URL for a Maven repository.

here is my build.gradle file

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.2.1'
        classpath 'com.google.gms:google-services:4.3.13'

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

apply from: "variables.gradle"

allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

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

can anyone help please ?

Note: This is old but I feel it may help someone…

Your build files probably do not have the maven repo url definitions. They should look something like…

 maven {
            url = "https://repo1.maven.org/maven2/"
        }
        maven {
            url "https://repo.spring.io/release"
        }
        maven {
            url "https://repository.jboss.org/maven2"
        }
        maven {
            url 'https://repo.jenkins-ci.org/public/'
        }

During your gradle build phase those paths are required during its download/sync operation.

I hope this helps.