[英]I have an error with Gradle
I have a problem, who can help me?我有问题,谁能帮帮我?
I made a application before 3 Months , with Android Studio 3. I tryed to open the application with Android Studio 2 but does't work .我在 3 个月前使用 Android Studio 3 制作了一个应用程序。我尝试使用 Android Studio 2 打开该应用程序,但没有成功。 So now I installed Android Stuido 3 but also It does't work :(
所以现在我安装了 Android Stuido 3 但它也不起作用:(
This my Gradle :这是我的摇篮:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.1.1"
defaultConfig {
applicationId "com.learnjava.vgpro"
minSdkVersion 14
targetSdkVersion 26
versionCode 4
versionName "3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:26.1.1'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services-ads:10.2.4'
}
This is the Problem :这就是问题 :
Error:(23, 0) Could not find method implementation() for arguments [directory 'libs'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
<a href="openFile:C:\Users\JamilHammash\Desktop\LearnJava\app\build.gradle">Open File</a>
update your gradle version to version 3, for example例如,将您的 gradle 版本更新到版本 3
classpath 'com.android.tools.build:gradle:3.0.0-rc2'
otherwise replacing:否则替换:
testImplementation with testCompile
an一个
implementation with compile
should help应该有帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.