"Could not find com.android.tools.build:gradle:7.2.0." with Chipmunk
Asked Answered
A

3

6

I have just updated Android Studio to Chipmunk and gradle file sync no longer works. The sync has the following errors:

Could not find com.android.tools.build:gradle:7.2.0.
Searched in the following locations:
  - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.2.0/gradle-7.2.0.pom
  - https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.2.0/gradle-7.2.0.pom
Required by:
    project :
Add google Maven repository and sync project
Open File

I clicked "Add google Maven repository and sync project" but nothing happened. I have the following in build.gradle:

buildscript {
    ext.kotlin_version = '1.3.72'
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.2.0'


        classpath("com.google.android.gms:oss-licenses-plugin:0.10.5")

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

Could anyone offer a tip on how to fix this?

Android Studio Chipmunk | 2021.2.1
Build #AI-212.5712.43.2112.8512546, built on April 28, 2022
Runtime version: 11.0.12+7-b1504.28-7817840 amd64
VM: OpenJDK 64-Bit Server VM by Oracle Corporation
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 16
Registry: external.system.auto.import.disabled=true, debugger.watches.in.variables=false
Non-Bundled Plugins: org.intellij.plugins.markdown (212.5457.16), com.thoughtworks.gauge (212.4746.52), org.jetbrains.kotlin (212-1.6.21-release-334-AS5457.46), com.android.aas (3.5.1), com.intellij.marketplace (212.5712.51), com.google.mad-scorecard (1.2)
Adumbral answered 9/5, 2022 at 14:24 Comment(0)
B
3

AGP 7.2.0 was released just some minutes ago and was not available earlier today yet. Try again.

Britteny answered 9/5, 2022 at 16:3 Comment(0)
V
6

from stackoverflow (example), just add google() in your build.gradle:

buildscript {
repositories {
    google()
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:7.2.1'
}

}

allprojects {
repositories {
    google()
    jcenter()
}

}

[https://mcmap.net/q/1770852/-gradle-error-in-android-studio-could-not-find-com-android-tools-build-gradle-7-1-1]

Vyner answered 29/7, 2022 at 12:10 Comment(0)
R
3

As there is no such release listed on that site, this might be a bug. Use version 7.1.3 instead.

UPDATE: The release was made later that day. Now it should work as expected.

Rendition answered 9/5, 2022 at 15:53 Comment(5)
Thank you. Android Studio keeps showing the notification for updating the project to 7.2. I will accept your answer if no one comes up with a way to use 7.2 today.Adumbral
Same problem here, I changed gradle version back to 7.1.3, now is working.Capitation
I checked Google's Maven repository for available versions and used 7.2.0-rc2 yesterday. 7.2.0 just appeared about an hour ago and I confirmed that it works.Tonsil
There is a strange issue with 7.2.0 on my end. All the sources were identical when I just updated them to 7.2.0 from 7.1.3. All is good when I run but when I release an APK then on one of my activities, gridView just doesn't inflate the card views without a crash. I tried rolling back and upgrading again. Be sure your APK/Bundle is complete.Quade
I am getting strange issue post update to 7.2.0: Could not resolve all dependencies for configuration ':app:androidApis'. & Could not create task ':app:generateDebugLintModel' when adding new flavour. Is anyone else facing same problem?Katanga
B
3

AGP 7.2.0 was released just some minutes ago and was not available earlier today yet. Try again.

Britteny answered 9/5, 2022 at 16:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.