[英]dependency com.android.tools.build:gradle:3.6.4 because no repositories are defined
I have already checked lots of questions related to this question but nothing working out我已经检查了很多与这个问题相关的问题,但没有任何结果
Project dependency Build.gradle项目依赖 Build.gradle
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.4'
classpath 'com.google.gms:google-services:4.3.4'
}}
allprojects {
repositories {
jcenter()
google()
}
} }
Error A problem occurred configuring project ':*********'.错误 配置项目“:*********”时出现问题。
Could not resolve all files for configuration '::classpath'.
无法解析配置“::classpath”的所有文件。 Cannot resolve external dependency com.android.tools.build:gradle:3.6.4 because no repositories are defined.
无法解析外部依赖项 com.android.tools.build:gradle:3.6.4,因为没有定义存储库。 Required by: project :*************
要求:项目:****************
Try: Run with --stacktrace option to get the stack trace.尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output.
使用 --info 或 --debug 选项运行以获得更多日志输出。 Run with --scan to get full insights.
使用 --scan 运行以获得完整的见解。
Get more help at https://help.gradle.org在https://help.gradle.org获取更多帮助
Can you please help me out on this?你能帮我解决这个问题吗?
在dependencies {}
块之后有一个额外的花括号,将它移到文件的末尾以便allprojects {}
被包含为buildscript {}
的子项
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.