'Flutter Error while building for first time

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring root project 'android'.

Could not resolve all artifacts for configuration ':classpath'. Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10. Required by: project : > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10. > Could not get resource 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.6.10/kotlin-gradle-plugin-1.6.10.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.6.10/kotlin-gradle-plugin-1.6.10.pom'. > Remote host terminated the handshake Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72. Required by: project : > com.android.tools.build:gradle:4.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:aaptcompiler:4.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.lint:lint-gradle-api:27.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:gradle-api:4.1.0 project : > com.android.tools.build:gradle:4.1.0 > androidx.databinding:databinding-compiler-common:4.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools.build:builder-model:4.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools:sdk-common:27.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools:common:27.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools.build:manifest-merger:27.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools.analytics-library:tracker:27.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.lint:lint-gradle-api:27.1.0 > com.android.tools.lint:lint-model:27.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools:sdklib:27.1.0 > com.android.tools:repository:27.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools:sdk-common:27.1.0 > com.android.tools.analytics-library:shared:27.1.0 > Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72. > Could not get resource 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.72/kotlin-stdlib-jdk8-1.3.72.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.72/kotlin-stdlib-jdk8-1.3.72.pom'. > Remote host terminated the handshake Could not resolve org.ow2.asm:asm:7.0. Required by: project : > com.android.tools.build:gradle:4.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > Could not resolve org.ow2.asm:asm:7.0. > Could not get resource 'https://repo.maven.apache.org/maven2/org/ow2/asm/asm/7.0/asm-7.0.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/org/ow2/asm/asm/7.0/asm-7.0.pom'. > Remote host terminated the handshake Could not resolve org.ow2.asm:asm-analysis:7.0. Required by: project : > com.android.tools.build:gradle:4.1.0 > Could not resolve org.ow2.asm:asm-analysis:7.0. > Could not get resource 'https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/7.0/asm-analysis-7.0.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/7.0/asm-analysis-7.0.pom'. > Remote host terminated the handshake Could not resolve org.ow2.asm:asm-commons:7.0. Required by: project : > com.android.tools.build:gradle:4.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > Could not resolve org.ow2.asm:asm-commons:7.0. > Could not get resource 'https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/7.0/asm-commons-7.0.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/7.0/asm-commons-7.0.pom'. > Remote host terminated the handshake Could not resolve org.ow2.asm:asm-util:7.0. Required by: project : > com.android.tools.build:gradle:4.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > Could not resolve org.ow2.asm:asm-util:7.0. > Could not get resource 'https://repo.maven.apache.org/maven2/org/ow2/asm/asm-util/7.0/asm-util-7.0.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/org/ow2/asm/asm-util/7.0/asm-util-7.0.pom'. > Remote host terminated the handshake Could not resolve net.sf.jopt-simple:jopt-simple:4.9. Required by: project : > com.android.tools.build:gradle:4.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > Could not resolve net.sf.jopt-simple:jopt-simple:4.9. > Could not get resource 'https://repo.maven.apache.org/maven2/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.pom'. > Remote host terminated the handshake Could not resolve net.sf.proguard:proguard-gradle:6.0.3. Required by: project : > com.android.tools.build:gradle:4.1.0 > Could not resolve net.sf.proguard:proguard-gradle:6.0.3. > Could not get resource 'https://repo.maven.apache.org/maven2/net/sf/proguard/proguard-gradle/6.0.3/proguard-gradle-6.0.3.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/net/sf/proguard/proguard-gradle/6.0.3/proguard-gradle-6.0.3.pom'. > Remote host terminated the handshake Could not resolve com.squareup:javapoet:1.10.0. Required by: project : > com.android.tools.build:gradle:4.1.0 project : > com.android.tools.build:gradle:4.1.0 > androidx.databinding:databinding-compiler-common:4.1.0 > Could not resolve com.squareup:javapoet:1.10.0. > Could not get resource 'https://repo.maven.apache.org/maven2/com/squareup/javapoet/1.10.0/javapoet-1.10.0.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/com/squareup/javapoet/1.10.0/javapoet-1.10.0.pom'. > Remote host terminated the handshake Could not resolve com.google.protobuf:protobuf-java:3.10.0. Required by: project : > com.android.tools.build:gradle:4.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:aapt2-proto:4.1.0-6503028 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools:sdk-common:27.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools.ddms:ddmlib:27.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools.analytics-library:protos:27.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools.analytics-library:tracker:27.1.0 > Could not resolve com.google.protobuf:protobuf-java:3.10.0. > Could not get resource 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.10.0/protobuf-java-3.10.0.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.10.0/protobuf-java-3.10.0.pom'. > Remote host terminated the handshake Could not resolve com.google.protobuf:protobuf-java-util:3.10.0. Required by: project : > com.android.tools.build:gradle:4.1.0 > Could not resolve com.google.protobuf:protobuf-java-util:3.10.0. > Could not get resource 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java-util/3.10.0/protobuf-java-util-3.10.0.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java-util/3.10.0/protobuf-java-util-3.10.0.pom'. > Remote host terminated the handshake Could not resolve com.google.crypto.tink:tink:1.3.0-rc2. Required by: project : > com.android.tools.build:gradle:4.1.0 > Could not resolve com.google.crypto.tink:tink:1.3.0-rc2. > Could not get resource 'https://repo.maven.apache.org/maven2/com/google/crypto/tink/tink/1.3.0-rc2/tink-1.3.0-rc2.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/com/google/crypto/tink/tink/1.3.0-rc2/tink-1.3.0-rc2.pom'. > Remote host terminated the handshake Could not resolve com.google.flatbuffers:flatbuffers-java:1.12.0. Required by: project : > com.android.tools.build:gradle:4.1.0 > Could not resolve com.google.flatbuffers:flatbuffers-java:1.12.0. > Could not get resource 'https://repo.maven.apache.org/maven2/com/google/flatbuffers/flatbuffers-java/1.12.0/flatbuffers-java-1.12.0.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/com/google/flatbuffers/flatbuffers-java/1.12.0/flatbuffers-java-1.12.0.pom'. > Remote host terminated the handshake Could not resolve org.tensorflow:tensorflow-lite-metadata:0.1.0-rc1. Required by: project : > com.android.tools.build:gradle:4.1.0 > Could not resolve org.tensorflow:tensorflow-lite-metadata:0.1.0-rc1. > Could not get resource 'https://repo.maven.apache.org/maven2/org/tensorflow/tensorflow-lite-metadata/0.1.0-rc1/tensorflow-lite-metadata-0.1.0-rc1.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/org/tensorflow/tensorflow-lite-metadata/0.1.0-rc1/tensorflow-lite-metadata-0.1.0-rc1.pom'. > Remote host terminated the handshake Could not resolve com.squareup:javawriter:2.5.0. Required by: project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > Could not resolve com.squareup:javawriter:2.5.0. > Could not get resource 'https://repo.maven.apache.org/maven2/com/squareup/javawriter/2.5.0/javawriter-2.5.0.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/com/squareup/javawriter/2.5.0/javawriter-2.5.0.pom'. > Remote host terminated the handshake Could not resolve org.bouncycastle:bcpkix-jdk15on:1.56. Required by: project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools:sdk-common:27.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools.build:apkzlib:4.1.0 > Could not resolve org.bouncycastle:bcpkix-jdk15on:1.56. > Could not get resource 'https://repo.maven.apache.org/maven2/org/bouncycastle/bcpkix-jdk15on/1.56/bcpkix-jdk15on-1.56.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/org/bouncycastle/bcpkix-jdk15on/1.56/bcpkix-jdk15on-1.56.pom'. > Remote host terminated the handshake Could not resolve org.bouncycastle:bcprov-jdk15on:1.56. Required by: project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools:sdk-common:27.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools.build:apkzlib:4.1.0 > Could not resolve org.bouncycastle:bcprov-jdk15on:1.56. > Could not get resource 'https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56.pom'. > Remote host terminated the handshake Could not resolve org.ow2.asm:asm-tree:7.0. Required by: project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > Could not resolve org.ow2.asm:asm-tree:7.0. > Could not get resource 'https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/7.0/asm-tree-7.0.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/7.0/asm-tree-7.0.pom'. > Remote host terminated the handshake Could not resolve javax.inject:javax.inject:1. Required by: project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools:sdk-common:27.1.0 > Could not resolve javax.inject:javax.inject:1. > Could not get resource 'https://repo.maven.apache.org/maven2/javax/inject/javax.inject/1/javax.inject-1.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/javax/inject/javax.inject/1/javax.inject-1.pom'. > Remote host terminated the handshake Could not resolve it.unimi.dsi:fastutil:7.2.0. Required by: project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > Could not resolve it.unimi.dsi:fastutil:7.2.0. > Could not get resource 'https://repo.maven.apache.org/maven2/it/unimi/dsi/fastutil/7.2.0/fastutil-7.2.0.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/it/unimi/dsi/fastutil/7.2.0/fastutil-7.2.0.pom'. > Remote host terminated the handshake Could not resolve com.googlecode.json-simple:json-simple:1.1. Required by: project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > Could not resolve com.googlecode.json-simple:json-simple:1.1. > Could not get resource 'https://repo.maven.apache.org/maven2/com/googlecode/json-simple/json-simple/1.1/json-simple-1.1.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/com/googlecode/json-simple/json-simple/1.1/json-simple-1.1.pom'. > Remote host terminated the handshake Could not resolve com.google.guava:guava:28.1-jre. Required by: project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:aaptcompiler:4.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.analytics-library:crash:27.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.lint:lint-gradle-api:27.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:gradle-api:4.1.0 project : > com.android.tools.build:gradle:4.1.0 > androidx.databinding:databinding-compiler-common:4.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools:common:27.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools.analytics-library:tracker:27.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools:sdk-common:27.1.0 > com.android.tools.analytics-library:shared:27.1.0 > Could not resolve com.google.guava:guava:28.1-jre. > Could not get resource 'https://repo.maven.apache.org/maven2/com/google/guava/guava/28.1-jre/guava-28.1-jre.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/com/google/guava/guava/28.1-jre/guava-28.1-jre.pom'. > Remote host terminated the handshake Could not resolve org.apache.httpcomponents:httpmime:4.5.6. Required by: project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.analytics-library:crash:27.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools:sdklib:27.1.0 > Could not resolve org.apache.httpcomponents:httpmime:4.5.6. > Could not get resource 'https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpmime/4.5.6/httpmime-4.5.6.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpmime/4.5.6/httpmime-4.5.6.pom'. > Remote host terminated the handshake Could not resolve org.apache.httpcomponents:httpcore:4.4.10. Required by: project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.analytics-library:crash:27.1.0 project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.build:builder:4.1.0 > com.android.tools:sdklib:27.1.0 > Could not resolve org.apache.httpcomponents:httpcore:4.4.10. > Could not get resource 'https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcore/4.4.10/httpcore-4.4.10.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcore/4.4.10/httpcore-4.4.10.pom'. > Remote host terminated the handshake Could not resolve org.apache.httpcomponents:httpclient:4.5.6. Required by: project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.analytics-library:crash:27.1.0 > Could not resolve org.apache.httpcomponents:httpclient:4.5.6. > Could not get resource 'https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.6/httpclient-4.5.6.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.6/httpclient-4.5.6.pom'. > Remote host terminated the handshake Could not resolve org.jetbrains.kotlin:kotlin-reflect:1.3.72. Required by: project : > com.android.tools.build:gradle:4.1.0 > com.android.tools.lint:lint-



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source