欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

RN项目报错: Could not resolve all files for configuration ':classpath'.

程序员文章站 2022-06-01 15:14:41
...

RN项目报错: Could not resolve all files for configuration ‘:classpath’.

报错信息如下图:
RN项目报错: Could not resolve all files for configuration ':classpath'.

解决办法:
在android目录下的build.gradle中给jcenter仓库指定url,具体用法如下
RN项目报错: Could not resolve all files for configuration ':classpath'.
可直接复制下列代码:

buildscript {
    repositories {
        jcenter() {
            url "http://jcenter.bintray.com/"
        }
        google()
    }
    dependencies {

        classpath 'com.android.tools.build:gradle:3.0.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}