[英]ERROR: Could not find method implementation() for arguments [directory 'libs'] on project ':app'
I've imported an existing project from this link https://github.com/udacity/ud839_Miwok我已经从此链接https://github.com/udacity/ud839_Miwok导入了一个现有项目
After importing into the android studio I came across this error ERROR: Could not find method implementation() for arguments [directory 'libs'] on project ':app'导入到 android studio 后,我遇到了这个错误 ERROR:Could not find method implementation() for arguments [directory 'libs'] on project ':app'
Here is the code with the error:这是有错误的代码:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.example.android.miwok"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
apply plugin: 'maven'
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:23.3.0'
implementation 'com.android.support:support-v4:23.3.0'
implementation 'com.android.support:design:23.3.0'
}
I've looked at all the similar questions and tried resolving by changing the implementation to compile then back again cause it didn't work.我已经查看了所有类似的问题,并尝试通过将实现更改为编译然后再次返回来解决,因为它不起作用。
Any suggestions would be appreciated.任何建议,将不胜感激。
Did u update your Gradle plugin?你更新你的 Gradle 插件了吗? Remove "apply plugin: 'maven'" from dependencies level and run build.
从依赖项级别删除“应用插件:'maven'”并运行构建。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.