Gradle DSL method not found: 'google()'
2024-10-22 15:32:31
报错信息如下:
Gradle DSL method not found: 'google()'
Possible causes:<ul><li>The project 'JustTest' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0).
Upgrade plugin to version 3.1.2 and sync project</li><li>The project 'JustTest' may be using a version of Gradle that does not contain the method.
Open Gradle wrapper file</li><li>The build file may be missing a Gradle plugin.
Apply Gradle plugin</li>
错误原因分析:没找到google(),The google() repo is a shortcut to looks in Google's Maven repository for dependencies. It was introduced with gradle v.4.0。(使用条件)It requires (currently)Gradle v.4、Android Studio 3.x.、Gradle plugin for Android 3.x
解决问题办法:
- 1、将google()替换成maven {url 'https://maven.google.com'}
- 2、满足上面使用google()的三个条件。
最新文章
- [C#] 走进 LINQ 的世界
- 《CPU的工作过程》
- python基础之day1
- Constraint3:check约束 和 null
- WebApi Post提交报错 调试无法进入对应action函数
- pycharm运行脚本为何不生成测试报告?
- 让mysql有直接写redis能力
- Unity3D脚本18:可视化辅助设置类 Gizmos
- java properties读取与设值
- redis的安装过程基本配置及遇到问题的解决
- DELPHI 里面的迭代
- 使用php将数组转为XML
- python小记列表排序
- Java I/O---序列化接口Serializable
- SIMPLE_DEV_PM_OPS宏
- xcodebuild构建时报错unknown error -1=ffffffffffffffff Command /bin/sh failed with exit code 1
- Django的下载与项目的创建
- CentOS7查询系统版本内核信息
- Java+Jmeter接口测试
- 2018.08.16 洛谷P1471 方差(线段树)