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下安装mysql)
转载请声明出处:http://blog.csdn.net/u013067166/article/details/49951577 最近重装了系统,去MySQL官网下载了最新的M ...
- centos7 下安装mongodb指南;
1.下载:https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-3.4.1.tgz; 2.解压缩; 3.文件存储在mongodb文件 ...
- MVC 模式和模型 2
MVC框架 一个实现 MVC 模式的应用包含模型.视图.控制器 3 个模块: 模型:封装了应用的数据和业务逻辑,负责管理系统业务数据 视图:负责应用的展示 控制器:负责与用户进行交互,接收用户输入.改 ...
- String、StringBuffer、StringBuilder和StringTokenizer的区别
1)String.StringBuffer.StringBuilder都用于字符串操作,其中,String是不可变类,即String对象一旦被创建,其值不能被修改,而StringBuffer和Stri ...
- Eloquent Attach/Detach/Sync Fires Any Event
eloquent-attach-detach-sync-fires-any-event I have a laravel project, and I need to make some calcul ...
- Snownlp
from snownlp import SnowNLP text='宝贝自拍很帅!!!注意休息-' s=SnowNLP(text) #分词print(s.words) #词性for tag in s. ...
- BP神经网络的理论理论常识
BP神经网络的简单结构:输入层.一个或者多个隐层.输出层.图如下: 在图中,涉及到的参数有:X1--Xn为输入参数.输入参数通过输入层和隐层之间的的链接权重进行计算,到达隐层. 隐层的输入参数通过隐层 ...
- IDEA导入MySQL包
点击[Project Structure] 点击[Modules] 在点击下面的界面 找到自己下载的MySQL包就OK了
- 720. Longest Word in Dictionary
static int wing=[]() { std::ios::sync_with_stdio(false); cin.tie(NULL); ; }(); class Solution { publ ...
- Lecture2
共生矩阵:
