I have upgrade Android Studio to the latest version shown here:-
Android Studio Bumblebee | 2021.1.1 Patch 3
Build #AI-211.7628.21.2111.8309675, built on March 16, 2022
Runtime version: 11.0.11 0-b60-7590822 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.7
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 12
Registry: external.system.auto.import.disabled=true, debugger.watches.in.variables=false
Non-Bundled Plugins: org.jetbrains.kotlin (211-1.6.20-release-275-AS7442.40), com.android.aas (3.6.0)
once the upgrade completed I have attempted to upgrade the gradle
to 7.3.1
classpath 'com.android.tools.build:gradle:7.1.3'
which appeared to complete ok however my application build now fails with this message
Could not find com.android.tools.build:gradle:7.1.3.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.1.3/gradle-7.1.3.pom
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.1.3/gradle-7.1.3.pom
Required by:
project :
Add google Maven repository and sync project
Open File
My project gradle resembles this
buildscript {
ext.kotlin_version = "1.6.20"
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.41'
}
}
allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
clicking on the link Add google Maven repository and sync project
does nothing
how can I resolve this build error?
CodePudding user response:
I had same this problem in may macbook. I was uninstall android studio and install again update patch 2021.1.1 Patch 3. But I don't update gradle plugin 7.1.3. I think 7.1.3 don't found in gradle website.
plugins {
id 'com.android.application' version '7.1.3' apply false
id 'com.android.library' version '7.1.3' apply false
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
CodePudding user response:
It's not available yet. Have a look at the official Maven Repository. You will see that the latest stable version is still 7.1.2.