/Users/Ren/Desktop/RecylerViewBaseAdapter/build.gradle
Error:(6, 0) Gradle DSL method not found: 'google()'
Possible causes:
The project 'RecylerViewBaseAdapter' may be using a version of Gradle that does not contain the method.
Gradle settings
The build file may be missing a Gradle plugin.
Apply Gradle plugin
最佳答案
google()
存储库是在 Google 的 Maven 存储库中查找依赖项的快捷方式。它是通过 gradle v.4.0 引入的.
它需要(当前)
尝试在gradle-wrapper.properties
中使用:
distributionUrl=\
https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip
作为 Android 的 gradle 插件使用:
classpath 'com.android.tools.build:gradle:3.0.0-beta1'
在任何情况下(也适用于 Android Studio 2.3、gradle plugin 2.3.3 和 gradle v3.3),您可以使用 { url 'https://maven.google.com'}
。是一样的。
仅使用示例:
buildscript {
repositories {
maven {
url 'https://maven.google.com'
}
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
//
}
https://stackoverflow.com/questions/45781489/
相关文章:
python - MANIFEST.in 在 "python setup.py install"上被
php - 错误构建 : fatal error: pcre. h:没有这样的文件或目录
jenkins - 使用 ‘H * * * *’ 而不是 ‘5 * * * *’ 均匀分布负载
visual-studio-2010 - 在每次编译时禁用 "output window"的显示
go - go build 是什么意思? (去构建与去安装)
shell - 运行 shell 脚本时如何在 Jenkins 中将构建标记为不稳定
unit-testing - 没有找到测试。确保已安装的测试发现器和执行器、平台和框架版本设置正确,