我已从此链接https://github.com/udacity/ud839_Miwok导入了一个现有项目
导入android studio后,我遇到了此错误 错误:在项目':app'上找不到参数[目录'libs']的方法Implementation()
以下是带有错误的代码:
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'
}
我查看了所有类似的问题,并尝试通过将实现更改为可编译来解决,然后再次返回,导致它无法正常工作。
任何建议将不胜感激。
答案 0 :(得分:0)
您是否更新了Gradle插件?从依赖级别删除“应用插件:'maven'”并运行构建。