Gradle sync failed on android studio 4.0

Viewed 3986

After upgrading my android project to classpath 'com.android.tools.build:gradle:4.0.0' and distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

I found this error

Gradle sync failed: Cause: org/gradle/api/internal/java/usagecontext/LazyConfigurationUsageContext

my project details is:

compileSdkVersion 29

ndkVersion "21.1.6352462"

minSdkVersion 21

targetSdkVersion 29

How I can solve this problem, on android studio 4.0?

1 Answers

Switch to gradle version 5.6.4. LazyConfigurationUsageContext doesn't have support in gradle versions 6.0+.

Related