简体   繁体   English

Android:找不到com.android.tools.build:gradle:3.0.1

[英]Android: Could not find com.android.tools.build:gradle:3.0.1

Excuse me, I am not familiar with react-native and android. 不好意思,我不熟悉react-native和android。 When I load my react-native project for the first time and try to sync and update I get this error. 当我第一次加载我的本机项目并尝试同步和更新时,出现此错误。

在此处输入图片说明

You need to add google() for your build script repo. 您需要为构建脚本存储库添加google() See my answer here: https://stackoverflow.com/a/51151050/8034839 在这里查看我的答案: https : //stackoverflow.com/a/51151050/8034839

ie

// 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.0.1'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM