【发布时间】:2020-02-22 08:29:38
【问题描述】:
我收到此错误 错误:在项目 ':app' 上找不到参数 [目录 'libs'] 的方法 implementation()。 打开文件 这些是 build.grade(Module : app) 的内容
//noinspection GradleCompatible
//noinspection ExpiredTargetSdkVersion
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "spoorthy.shopping"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
}
等级文件(项目:购物)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
【问题讨论】:
-
你的gradle版本太低了,建议你把你的Android Studio升级到新版本
-
我已经下载了这个应用来在我的电脑上运行它。
标签: java android android-studio