title: How to fix in android the error "Could not find com.android.tools.build:gradle:3.4.1"?
body: <p>I have updated the version of <strong>Android Studio</strong> at the <strong>3.4.1</strong>. <br />
  Immediately the version of <strong>Android Gradle Plugin Version</strong> and <strong>Gradle Version</strong> weren't the last so I have changed with <strong>3.4.1</strong> and <strong>5.1.1</strong> (<em>File > Project structure > Project</em>).<br />
  Now, I'm trying to create an apk but I have the error "Could not find com.android.tools.build:gradle:3.4.1".<br />
  The project is created with <strong>cordova</strong> and first I have updated cordova at the version <strong>9.0.0</strong>.<br />
  I also have noticed that I don't have <em>Build > Generated Signed Apk</em> but only <em>Build > Build Bundle</em>.<br /></p>
  
  <p>After a long search, I have tried to:<br />
  1. change task wrapper with</p>
  
  <pre><code>wrapper {gradleVersion = '2.14.1'}
  </code></pre>
  
  <ol start="2">
  <li><p>add google() in</p>
  
  <p>repositories {
       mavenCentral()
       jcenter()
       google()
      }</p></li>
  <li><p>Verify that the link "distributionUrl=https://services.gradle.org/distributions/gradle-5.1.1-all.zip" is correct</p></li>
  <li><p>Verify that there is the function mavenCentral()</p></li>
  <li><p>In <em>File > Settings > Build, Execution... > Build Tools > Gradle</em> "Use default gradle wrapper" is checked and "Offline work" not checked</p></li>
  </ol>
  
  <p><strong>build.gradle</strong></p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  buildscript {
      repositories {
          mavenCentral()
          jcenter()
      }
  
      // Switch the Android Gradle plugin version requirement depending on the
      // installed version of Gradle. This dependency is documented at
      // http://tools.android.com/tech-docs/new-build-system/version-compatibility
      // and https://issues.apache.org/jira/browse/CB-8143
      dependencies {
          classpath 'com.android.tools.build:gradle:3.4.1'
      }
  }
  
  // Allow plugins to declare Maven dependencies via build-extras.gradle.
  allprojects {
      repositories {
          mavenCentral();
          jcenter()
      }
  }
  
  task wrapper(type: Wrapper) {
      gradleVersion = '2.14.1'
      }
  </code></pre>
  
  <p><strong>gradle-wrapper.properties</strong></p>
  
  <pre><code>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>
  
  <p><a href="https://i.stack.imgur.com/Q7I6x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q7I6x.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/sszkz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sszkz.png" alt="enter image description here"></a>
  What can I do to fix the problem? And what can I do to have the function Generated Signed Apk?</p>