Android-Could not find method implementation() for arguments
当AndroidStudio加载工程的时候:报以下错误:
详细错误:
Could not find method implementation() for arguments [file collection] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

在工程的app/build.gradle中查看:

修改工程的app/build.gradle,compile -修改成--> implementation
【解决此问题的第一步:】
查看工程的-build.gradle:

打开一个,在当前电脑,当前AndroidStudio正常编译运行OK的工程的build.gradle文件:
copy classpath 'com.android.tools.build:gradle:3.2.1'

【解决此问题的第二步:】
修改工程的-build.gradle,为 classpath 'com.android.tools.build:gradle:3.2.1'

成功解决:

总结解决细节:解决这种类型的错误,一定一定要仔细分析报错的详情(例如:翻译报错详情),特别要注意的是,报错详情中 有没有提示版本相关的信息,非常重要;
总结解决步骤:
为什么要修改 compile 为 implementation:
implementation是gradle版本3.0之后才支持的,出现该问题代表你的gradle版本过低。
解决步骤:
第一步:将implementation改为compile
第二步:升级build.gradle文件中的Gradle版本
Android-Could not find method implementation() for arguments的更多相关文章
- Error:(23, 0) Could not find method implementation() for arguments [directory 'libs'] on object of t
Error:(28, 0) Could not find method implementation() for arguments [com.android.support:appcompat-v7 ...
- #warning Incomplete method implementation怎么修改?
#warning Incomplete method implementation怎么修改? 各位朋友,我在做一个表格视图的例子,在tableview方法里总有几个warning:#war ...
- Error:Could not find method google() for arguments [] on repository container
Error:Could not find method google() for arguments [] on repository container. Consult IDE log for m ...
- android studio 报ambiguous method call
如题,在android studio中调用this.toString时,提示的错误信息是ambiguous method call. both get class () in object and g ...
- [Android ADB] An auto-input method for Android and Windows
The Valentine's Day is coming. Here is an auto-input method and you may use it to send multiple word ...
- Android Gradle 依赖配置:implementation & api
背景: Android Gradle plugin 3.0开始(对应Gradle版本 4.1及以上),原有的依赖配置类型compile已经被废弃,开始使用implementation.api和anno ...
- Android Studio升级后报 method not found: 'runProguard'的错误
今天升级了下Android Studio,然后发现更新gradle,然后在sync项目的时候总是报 method not found: 'runProguard'的错误 找了很多发现不对. 最后解决 ...
- Could not find method google() for arguments [] on repository container,rn 集成react-native-camera 出现此错误的解决方法
(1) app/build.gradle android { compileSdkVersion buildToolsVersion "25.0.2" } compile (pro ...
- android kotlin Gradle DSL method not found: '1.2.51()'错误,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).
同步的时候遇到这个问题,从log上看是因为gradle的版本不包含kotlin 1.2.51这个method,具体原因我也不是很清楚,大概猜测是kotlin版本的问题,而最新的版本就是1.2.51,所 ...
随机推荐
- Windows 下 Phpstrom 配置git使用
首先先去下载 git 下载链接 https://git-scm.com/download/winphpstrom 配置git 链接 http://jingyan.baidu.com/artic ...
- C/C++常用预处理指令
预处理是在编译之前的处理,而编译工作的任务之一就是语法检查,预处理不做语法检查.预处理命令以符号“#”开头. 常用的预处理指令包括: 宏定义:#define 文件包含:#include 条件编译:#i ...
- [线段树]picture
PICTURE 题目描述 N(N<5000) 张矩形的海报,照片和其他同样形状的图片贴在墙上.它们的边都是垂直的或水平的.每个矩形可以部分或者全部覆盖其他矩形.所有的矩形组成的集合的轮廓称为周长 ...
- Jackson高并发情况下,产生阻塞
情况:在高并发情况下,查看线程栈信息,有大量的线程BLOCKED. 从线程栈得知,线程栈中出现了阻塞,锁在了com.fasterxml.jackson.databind.ser.SerializerC ...
- 在linux虚拟机上安装Docker
1.简介Docker是一个开源的应用容器引擎:是一个轻量级容器技术: Docker支持将软件编译成一个镜像:然后在镜像中各种软件做好配置,将镜像发布出去,其他使用者可以直接使用这个镜像: 运行中的这个 ...
- Spring IOC(六)依赖查找
Spring IOC(六)依赖查找 Spring 系列目录(https://www.cnblogs.com/binarylei/p/10198698.html) Spring BeanFactory ...
- 利用js代码:document.forms[0].approval.value='false',当点击 <input type="image"按钮向表单传递不同的参数。
<form action="flow_myTaskList"> <input type="hidden" name="approva ...
- 句子相似度_tf/idf
import mathfrom math import isnanimport pandas as pd#结巴分词,切开之后,有分隔符def jieba_function(sent): import ...
- SharePoint 开发小结
目标:将sharepoint网站对接Office 365 最直接的API:How to: Add Office 365 APIs to a Visual Studio project http://m ...
- 论Java的重要性
最近,最新的世界编程语言排名最近出炉了,Java位居世界第一. 不仅如此,Java以17.856%超过第二名C语言的8.726%两倍以上,其实,这一现象是十分反常的,因为,在前几年, ...
