Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to upgrade AGP version

I cannot update my project. When I try to do this I got this message

The Upgrade Assistant failed to upgrade this project, finding no way of performing the Upgrade AGP version from 4.1.3 to 4.2.0 command, possibly because the project's build files use features not currently supported by the Upgrade Assistant (for example: using constants defined in buildSrc, or other unrecognized constructs, in Gradle build files).

What can i do about it?

like image 858
Akzhan Avatar asked May 12 '21 03:05

Akzhan


1 Answers

You have to manually change the gradle versions in build.gradle.kts (project) and then in gradle-wrapper.properties to version that matches your build.gradle.kts version

For example

build.gradle.kts
"com.android.tools.build:gradle:7.0.0-alpha14"

gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip

Naturally, change the versions accordingly to what you're using

like image 189
qki Avatar answered Oct 18 '22 22:10

qki