title: Build error in Gradle/Flutter: 'Could not resolve all artifacts for configuration'?
body: <p>Trying to build the application, the compiler spits out this:</p>
  <pre><code>
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  A problem occurred configuring project ':app_settings'.
  &gt; Could not resolve all artifacts for configuration ':app_settings:classpath'.
     &gt; Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.70.
       Searched in the following locations:
         - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.3.70/kotlin-gradle-plugin-1.3.70.pom
       If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
       Required by:
           project :app_settings
     &gt; Could not find org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61.
       Searched in the following locations:
         - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.61/kotlin-stdlib-jdk8-1.3.61.pom
       If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
       Required by:
           project :app_settings &gt; com.android.tools.build:gradle:3.6.1
           project :app_settings &gt; com.android.tools.build:gradle:3.6.1 &gt; com.android.tools.build:builder:3.6.1
           project :app_settings &gt; com.android.tools.build:gradle:3.6.1 &gt; com.android.tools.lint:lint-gradle-api:26.6.1
           project :app_settings &gt; com.android.tools.build:gradle:3.6.1 &gt; com.android.tools.build:gradle-api:3.6.1
           project :app_settings &gt; com.android.tools.build:gradle:3.6.1 &gt; androidx.databinding:databinding-compiler-common:3.6.1
           project :app_settings &gt; com.android.tools.build:gradle:3.6.1 &gt; com.android.tools.build:builder:3.6.1 &gt; com.android.tools:sdk-common:26.6.1
           project :app_settings &gt; com.android.tools.build:gradle:3.6.1 &gt; com.android.tools.build:builder:3.6.1 &gt; com.android.tools:common:26.6.1
           project :app_settings &gt; com.android.tools.build:gradle:3.6.1 &gt; com.android.tools.build:builder:3.6.1 &gt; com.android.tools.build:manifest-merger:26.6.1
           project :app_settings &gt; com.android.tools.build:gradle:3.6.1 &gt; com.android.tools.build:builder:3.6.1 &gt; com.android.tools.analytics-library:tracker:26.6.1
           project :app_settings &gt; com.android.tools.build:gradle:3.6.1 &gt; com.android.tools.build:builder:3.6.1 &gt; com.android.tools:sdklib:26.6.1 &gt; com.android.tools:repository:26.6.1
           project :app_settings &gt; com.android.tools.build:gradle:3.6.1 &gt; com.android.tools.build:builder:3.6.1 &gt; com.android.tools:sdk-common:26.6.1 &gt; com.android.tools.analytics-library:shared:26.6.1
     &gt; Could not find org.ow2.asm:asm:7.0.
       Searched in the following locations:
         - https://dl.google.com/dl/android/maven2/org/ow2/asm/asm/7.0/asm-7.0.pom
       If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
       Required by:
           project :app_settings &gt; com.android.tools.build:gradle:3.6.1
           project :app_settings &gt; com.android.tools.build:gradle:3.6.1 &gt; com.android.tools.build:builder:3.6.1
     &gt; Could not find org.ow2.asm:asm-analysis:7.0.
       Searched in the following locations:
         - https://dl.google.com/dl/android/maven2/org/ow2/asm/asm-analysis/7.0/asm-analysis-7.0.pom
       If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
       Required by:
           project :app_settings &gt; com.android.tools.build:gradle:3.6.1
     &gt; Could not find org.ow2.asm:asm-commons:7.0.
       Searched in the following locations:
         - https://dl.google.com/dl/android/maven2/org/ow2/asm/asm-commons/7.0/asm-commons-7.0.pom
       If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
       Required by:
           project :app_settings &gt; com.android.tools.build:gradle:3.6.1
           project :app_settings &gt; com.android.tools.build:gradle:3.6.1 &gt; com.android.tools.build:builder:3.6.1
     &gt; Could not find org.ow2.asm:asm-util:7.0.
       Searched in the following locations:
         - https://dl.google.com/dl/android/maven2/org/ow2/asm/asm-util/7.0/asm-util-7.0.pom
       If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
       Required by:
           project :app_settings &gt;....
  
  </code></pre>
  <p>Full output at :<a href="https://pastebin.com/Vj67AWAH" rel="nofollow noreferrer">https://pastebin.com/Vj67AWAH</a></p>
  <p>I've tried removing the app_settins plugin, but it just fails on another plugin, so I think is a general problem, not a plugin-specific one.</p>
  <p>I tried to re-install AndroidStudio, in different version, just like the jdk and the flutter sdk</p>
  <p>I'm just can't wrap my head around it</p>
  <p>HELP!</p>
  <hr />
  <p>EDIT</p>
  <p>Here's the build.gradle:</p>
  <pre><code>
  buildscript {
      ext.kotlin_version = '1.4.31'
      repositories {
          google()
          jcenter()
      }
  
      dependencies {
          classpath 'com.android.tools.build:gradle:4.1.2'
          classpath &quot;org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version&quot;
      }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
      }
  }
  
  rootProject.buildDir = '../build'
  subprojects {
      project.buildDir = &quot;${rootProject.buildDir}/${project.name}&quot;
      project.evaluationDependsOn(':app')
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  
  
  </code></pre>