如何修复“找不到com.android.tools.build:gradle:3.4.1

时间:2019-07-09 07:22:37

标签: android react-native gradle react-android

我是React Native的新手,当我想运行我的第一个项目时,出现此错误,

如何修复它,谢谢您的关注

  

“找不到com.android.tools.build:gradle:3.4.1。

在以下位置搜索:

thisthis

project / buil.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        maven {
            url 'https://dl.google.com/dl/android/maven2'
        }
        jcenter()
        mavenCentral()
        //apply plugin: 'jetty'
        apply plugin: 'maven'
        google()
        jcenter()
        maven { url 'https://maven.google.com' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.1'
        classpath 'com.android.tools.build.jetifier:jetifier-core:1.0.0-beta04'
        classpath 'com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta04'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

//task clean(type: Delete) {
 //   delete rootProject.buildDir
//}


0 个答案:

没有答案