报错信息如下:
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()的三个条件。

Gradle DSL method not found: 'google()'的更多相关文章

  1. [原创] Gradle DSL method not found: 'android()' 和 buildToolsVersion is not specified 的解决办法。

    今天在用Android Studio 2.0 打开别人的较早版本生成的工程时, 提示: Gradle DSL method not found: 'android()'. 解决办法为,打开根目录下面的 ...

  2. android studio ,Gradle DSL method not found: 'compile()'

    用gradle构建android工程出现  Gradle DSL method not found: 'compile()' 错误 检查你外层的build.gradle文件中是不是用了compile方 ...

  3. After Android Studio update: Gradle DSL method not found: 'runProguard()'

    1 具体报错为: Error:(16, 0) Gradle DSL method not found: 'runProguard()' Possible causes:<ul><li ...

  4. Gradle DSL method found: ‘android()’错误

    Gradle DSL method found: ‘android()’错误 和上个错误一样这个也是因为在新版本的Gradle中android()方法已经废弃,但是要注意android()只是在整个项 ...

  5. Gradle DSL method not found: 'android()

    原文错误提示: Error:(16, 0) Gradle DSL method not found: 'android()'Possible causes:<ul><li>Th ...

  6. 【转】解决Gradle DSL method not found: ‘android()’

    [转]解决Gradle DSL method not found: ‘android()’ 最近导入as的项目出了这样的问题 这个问题困扰了我很长时间,好吧,搜了半天全都是runProguard的,最 ...

  7. Android Studio:Gradle DSL method not found: 'runProguard()'

    Android Studio发布了新的1.0版,更新之后却发现原来在0.8下面正常的项目编译失败了,从报错上来看是卡在gradle上面. Gradle DSL method not found: 'r ...

  8. Android Studio 导入别人项目时候遇见的问题“Gradle DSL method not found: 'compile()'”

    Gradle DSL method not found: 'compile() 遇见这个问题截图: 解决: 在项目的根目录的build.gradle文件中是不是用了compile方法 如果有的话,剪切 ...

  9. Android Studio 新手常见错误:Gradle DSL method not found: &#39;runProguard()&#39;

    在Android Studio上执行Github上的某Android开源项目,提示报错: Error:(20, 0) Gradle DSL method not found: 'runProguard ...

随机推荐

  1. 求两个数的最大公约数&求N个数的最大公约数

    一.求两个数的最大公约数 如何编程计算N个数的最大公约数(Greatest common divisor)呢?第一想法那便是两两计算,但是往往最简单的想法是不怎么靠谱的.下面用递归来解决.递归有一大好 ...

  2. 毕业一年后接私活赚了10w,还拿了几家大厂offer!

    原本计划这周接着写一篇技术文章的,但是没想到忙到天天凌晨回家,几乎没有为下一篇文章做准备的时间(通常写一篇文章需要至少 30 个小时,需要搭进日常下班及周末的休息时间).这周如果写的话精力和时间都达不 ...

  3. C++ stringstream 实现字符与数字之间的转换

    c++中利用srtingstream可以将数字转为字符串,或者将字符串转为数字: 首先将double型数字串转成了string: stringnum2string(double *a,int n) { ...

  4. gcc 执行c++报错

    D:\cpp>g++ hello.cc Info: resolving std::cout by linking to __imp___ZSt4cout (auto-import) c:/min ...

  5. hi-nginx-java并发性能一窥

    欲知hi-nginx-java的并发性能,用jmeter进行测试便知一二. 设定用户数为100000,循环次数为100,ramp-up perio为2: 请求地址为http://localhost/t ...

  6. Python学习笔记4:函数

    1.函数 函数就是一段具有特点功能的.可重用的语句组. 在Python中函数是以关键词 def 开头,空格之后连接函数名和圆括号(),最后一个冒号:结尾. 函数名只能包含字符串.下划线和数字且不能以数 ...

  7. linux 中断softirq tasklet

    硬中断为什么不能休眠--- 中断线程以及软中断解决了什么问题---- 软中断cb函数是否允许相应本地中断,什么时候开启中断关闭中断---- 什么是软中断上下文------- 什么是tasklet 和软 ...

  8. c++ priority_queue应用(重要)

    自定义排序 重写仿函数 struct cmp{ bool operator() ( Node a, Node b ){//默认是less函数 //返回true时,a的优先级低于b的优先级(a排在b的后 ...

  9. [LeetCode题解]21. 合并两个有序链表 | 递归

    解题思路 使用递归实现: 定义函数功能:合并两个有序链表,并返回链表的头 结束条件:两个链表其中一个为空,返回另一个链表 递推公式: l1.val < l2.val:l1.next = Merg ...

  10. 使用XSL解析XML输出HTML(XSL学习笔记一)

    最近项目用到 XSL + XML,XML大家应该很熟悉,XSL暂且不解释,先看效果,如果想学习XSL的内容,可以先访问: https://www.w3school.com.cn/xsl/xsl_lan ...