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,所 ...
 
随机推荐
- 08. pt-find
			
vim pt-find.cnf host=192.168.100.101port=3306user=adminpassword=admin pt-find --config pt-find.cnf d ...
 - Codeforces 803C. Maximal GCD 二分
			
C. Maximal GCD time limit per test: 1 second memory limit per test: 256 megabytes input: standard in ...
 - 通过代理上网时,qq等应用程序连网出错
			
虽然现在基本上都用无线,有线宽带等,但是有时候还是避免不了通过代理上网时,于是就发生浏览器可以正常浏览网页,qq等应用程序连接出错等问题,上网搜了好长时间, 都没解决问题,后来慢慢琢磨(其实是乱 ...
 - [ASP.NET]使用Oracle.ManagedDataAccess的OracleParameter参数化和OracleDataAdapter模糊查询
			
今天写个查询员工的信息的demo遇到了2个问题 问题1.使用Oracle.ManagedDataAccess的OracleParameter参数化 OracleParameter 的使用(参数名要以: ...
 - linux下设置mysql表名不区分大小写
			
原文:http://blog.csdn.net/johnsonvily/article/details/6703902 1.Linux下mysql安装完后是默认:区分表名的大小写,不区分列名的大小写: ...
 - normalized
			
共同点:实现规范化,让一个向量保持相同的方向,但它的长度为1.0,如果这个向量太小而不能被规范化,一个零向量将会被返回. 不同点:Vector3.normalized的作特点是当前向量是不改变的并且返 ...
 - Python脚本语言第一行的写法
			
脚本语言的第一行,目的就是指出,你想要你的这个文件中的代码用什么可执行程序去运行它,就这么简单 #!/usr/bin/python是告诉操作系统执行这个脚本的时候,调用/usr/bin下的python ...
 - 2018.12.15 spoj Substrings(后缀自动机)
			
传送门 后缀自动机基础题. 求长度为iii的子串出现次数的最大值. 对原串建出samsamsam,然后用sizsizsiz更新每个maxlenmaxlenmaxlen的答案. 然后由于后缀链接将其转化 ...
 - Centos7 yum install vim 出现“could not retrieve mirrorlist”
			
ps:来源 https://www.cnblogs.com/justphp/p/5959655.html 办法一:改dns解析 vim /etc/resolv.conf 添加: nameserver ...
 - idea下启动tomcat时,打印的日志中文乱码
			
idea2018.2+tomcat8+java8+win10 异常:将编码方式全都修改为UTF-8后,且tomcat的VM启动参数中配置了:-Dfile.encoding=UTF-8.导致控制台日志打 ...
 
			
		