title: Could not resolve all artifacts for configuration ':classpath'
body: <p>tns info:</p>
  
  <pre><code>√ Getting NativeScript components versions information...
  √ Component nativescript has 6.0.0 version and is up to date.
  √ Component tns-core-modules has 6.0.1 version and is up to date.
  √ Component tns-android has 6.0.0 version and is up to date.
  ‼ Update available for component tns-ios. Your current version is 6.0.0 and the latest available version is 6.0.1.
  </code></pre>
  
  <p>I was trying to update a nativescript project that was written in 2017 to to the last version of nativescript, I also updated my nativescript to version 6. But when I try <code>tns run android --device Pixel-2_API_29</code> command to run my project on the emulator, I get this error message:</p>
  
  <pre><code>Searching for devices...
  Starting Android emulator with image Pixel_2_API_29
  Waiting for emulator device initialization...
  Your application will be deployed only on the device specified by the provided index or identifier.
  Preparing project...
  File change detected. Starting incremental webpack compilation...
  
  webpack is watching the files…
  
  Hash: f2ba56167c5538fba945
  Version: webpack 4.27.1
  Time: 12115ms
  Built at: 07/19/2019 5:02:07 PM
                Asset       Size   Chunks             Chunk Names
  app/images/logo.png     21 KiB           [emitted]
            bundle.js    320 KiB   bundle  [emitted]  bundle
         package.json  112 bytes           [emitted]
           runtime.js   71.4 KiB  runtime  [emitted]  runtime
  tns-java-classes.js    0 bytes           [emitted]
            vendor.js   14.8 MiB   vendor  [emitted]  vendor
  Entrypoint bundle = runtime.js vendor.js bundle.js
  [./app.css] 1.7 KiB {bundle} [built]
  [./app/about/about.component.ts] 1.48 KiB {bundle} [built]
  [./app/app.component.ts] 354 bytes {bundle} [built]
  [./app/app.module.ts] 4.03 KiB {bundle} [built]
  [./app/app.routing.ts] 1.47 KiB {bundle} [built]
  [./app/comment/comment.component.ts] 1.92 KiB {bundle} [built]
  [./app/contact/contact.component.ts] 1.97 KiB {bundle} [built]
  [./app/dishdetail/dishdetail.component.ts] 8.2 KiB {bundle} [built]
  [./app/favorites/favorites.component.ts] 4.54 KiB {bundle} [built]
  [./app/home/home.component.ts] 8.82 KiB {bundle} [built]
  [./app/menu/menu.component.ts] 1.45 KiB {bundle} [built]
  [./app/reservation/reservation.component.ts] 5.15 KiB {bundle} [built]
  [./app/reservationmodal/reservationmodal.component.ts] 2.44 KiB {bundle} [built]
  [./app/services/couchbase.service.ts] 1.03 KiB {bundle} [built]
  [./main.ts] 2.36 KiB {bundle} [built]
      + 490 hidden modules
  Webpack compilation complete. Watching for file changes.
  Webpack build done!
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  A problem occurred configuring root project 'nativescript_phone'.
  &gt; Could not resolve all artifacts for configuration ':classpath'.
     &gt; Could not find gradle.jar (com.android.tools.build:gradle:3.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.1/gradle-3.4.1.jar
     &gt; Could not find builder.jar (com.android.tools.build:builder:3.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.4.1/builder-3.4.1.jar
     &gt; Could not find tracker.jar (com.android.tools.analytics-library:tracker:26.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/26.4.1/tracker-26.4.1.jar
     &gt; Could not find shared.jar (com.android.tools.analytics-library:shared:26.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.4.1/shared-26.4.1.jar
     &gt; Could not find crash.jar (com.android.tools.analytics-library:crash:26.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/crash/26.4.1/crash-26.4.1.jar
     &gt; Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle-api/26.4.1/lint-gradle-api-26.4.1.jar
     &gt; Could not find gradle-api.jar (com.android.tools.build:gradle-api:3.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.4.1/gradle-api-3.4.1.jar
     &gt; Could not find databinding-compiler-common.jar (androidx.databinding:databinding-compiler-common:3.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/androidx/databinding/databinding-compiler-common/3.4.1/databinding-compiler-common-3.4.1.jar
     &gt; Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/26.4.1/manifest-merger-26.4.1.jar
     &gt; Could not find sdk-common.jar (com.android.tools:sdk-common:26.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.4.1/sdk-common-26.4.1.jar
     &gt; Could not find builder-test-api.jar (com.android.tools.build:builder-test-api:3.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.4.1/builder-test-api-3.4.1.jar
     &gt; Could not find ddmlib.jar (com.android.tools.ddms:ddmlib:26.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/26.4.1/ddmlib-26.4.1.jar
     &gt; Could not find sdklib.jar (com.android.tools:sdklib:26.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.4.1/sdklib-26.4.1.jar
     &gt; Could not find layoutlib-api.jar (com.android.tools.layoutlib:layoutlib-api:26.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/26.4.1/layoutlib-api-26.4.1.jar
     &gt; Could not find dvlib.jar (com.android.tools:dvlib:26.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/26.4.1/dvlib-26.4.1.jar
     &gt; Could not find repository.jar (com.android.tools:repository:26.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/repository/26.4.1/repository-26.4.1.jar
     &gt; Could not find common.jar (com.android.tools:common:26.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/common/26.4.1/common-26.4.1.jar
     &gt; Could not find protos.jar (com.android.tools.analytics-library:protos:26.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.4.1/protos-26.4.1.jar
     &gt; Could not find builder-model.jar (com.android.tools.build:builder-model:3.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/3.4.1/builder-model-3.4.1.jar
     &gt; Could not find apkzlib.jar (com.android.tools.build:apkzlib:3.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/build/apkzlib/3.4.1/apkzlib-3.4.1.jar
     &gt; Could not find apksig.jar (com.android.tools.build:apksig:3.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.4.1/apksig-3.4.1.jar
     &gt; Could not find annotations.jar (com.android.tools:annotations:26.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.4.1/annotations-26.4.1.jar
     &gt; Could not find databinding-common.jar (androidx.databinding:databinding-common:3.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/androidx/databinding/databinding-common/3.4.1/databinding-common-3.4.1.jar
     &gt; Could not find baseLibrary.jar (com.android.databinding:baseLibrary:3.4.1).
       Searched in the following locations:
           https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.4.1/baseLibrary-3.4.1.jar
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  
  * Get more help at https://help.gradle.org
  
  BUILD FAILED in 1s
  Failed to build plugin nativescript-phone :
  Error: Command gradlew.bat failed with exit code 1
  </code></pre>
  
  <p>What is the problem and how can I fix it? I search on the web but can't find a solution that works for me</p>
  
  <p>You can also find my project files here: <a href="https://github.com/bestazad/confusion" rel="nofollow noreferrer">https://github.com/bestazad/confusion</a></p>
  
  <p>This is the content of <code>build.gradle</code> file:</p>
  
  <pre><code>
  // Top-level build file where you can add configuration options common to all sub-projects/modules.
  
  buildscript {
  
      repositories {
          google()
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.4.1'
      }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  
  </code></pre>
  
  <p>Also the content of <code>gradle-wrapper.jar</code>:</p>
  
  <pre><code>#Tue Apr 30 12:10:15 EEST 2019
  distributionBase=GRADLE_USER_HOME
  distributionPath=wrapper/dists
  zipStoreBase=GRADLE_USER_HOME
  zipStorePath=wrapper/dists
  distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
  
  </code></pre>