Flutter problems: “Could not resolve all artifacts for configuration ‘:classpath’ “

The problem probably was caused by updating the gradle. The Android Studio always asks you to update it, but don’t do this for flutter apps. I had the same issue and I solved with the following versions:

On build.gradle module level:

buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

On build.gradle app level:

compileSdkVersion 28
targetSdkVersion 28

On gradle-wrapper.properties:

distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip

By the way, I got all those versions by creating a new flutter app on 1.20 stable version.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)