如何修复 Could not find method implementation() for argument[project':app']
How to fix Could not find method implementation() for argument[project':app']
我从 GitHub 导入一个项目,然后当我 运行 它时,
问题出现了。
:Could not find method implementation() for arguments [project ':app']
https://i.loli.net/2019/04/26/5cc30c4714f6a.png
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
allprojects {
repositories {
jcenter()
google()
}
}
dependencies {
implementation project(':app')
//compile project(':app')
}
升级到 Gradle 3.4。 Gradle 3.4.
之前不能使用实现
classpath 'com.android.tools.build:gradle:3.4.0'
我从 GitHub 导入一个项目,然后当我 运行 它时, 问题出现了。
:Could not find method implementation() for arguments [project ':app']
https://i.loli.net/2019/04/26/5cc30c4714f6a.png
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
allprojects {
repositories {
jcenter()
google()
}
}
dependencies {
implementation project(':app')
//compile project(':app')
}
升级到 Gradle 3.4。 Gradle 3.4.
之前不能使用实现classpath 'com.android.tools.build:gradle:3.4.0'