RN项目报错: Could not resolve all files for configuration ‘:classpath’.
报错信息如下图:
解决办法:
在android目录下的build.gradle中给jcenter仓库指定url,具体用法如下
可直接复制下列代码:
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
}
}