Could not find method implementation() for arguments [directory ‘libs‘] on object of type org.gradle

Posted 彬sir哥

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Could not find method implementation() for arguments [directory ‘libs‘] on object of type org.gradle相关的知识,希望对你有一定的参考价值。

1.android的报错提示:
Error:(25, 0) Could not find method implementation() for arguments [directory ‘libs’] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Open File
在这里插入图片描述
解决:“implementation”和“androidTestImplementation”都改为“compile”,“testImplementation”改为“testCompile”

dependencies {
   
    implementation fileTree(dir: \'libs\', include: [\'*.jar\'])
    implementat

以上是关于Could not find method implementation() for arguments [directory ‘libs‘] on object of type org.gradle的主要内容,如果未能解决你的问题,请参考以下文章

Android studio报错Could not find method dependencyResolutionManagement() for arguments的解决方法

Could not find method google() for arguments [] on repository container. open File

Qt for android报错 Could not find method ?buildscript() for arguments

Qt for android报错 Could not find method ?buildscript() for arguments

首次使用gradle出现Could not find method leftShift() for arguments解决办法

Android studio:Could not find method compile() for arguments 问题解决及两种解决方法探讨延伸