- Configuration 'compile' is obsolete and has been replaced with 'implementation'
- Configuration 'androidTestCompile' is obsolete and has been replaced with 'androidTestImplementation'
- Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation'
- Android Studio 3.1.3
- buildToolsVersion "28.0.0"
- Compile Target SDK 28 / min SDK 17
- Change 'compile' to 'implementation'
- Change 'androidTestCompile' to 'androidTestImplementation'
- Change 'testCompile' to 'testImplementation'
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
minSdkVersion 17
targetSdkVersion 27
...
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'org.jsoup:jsoup:+'
compile 'com.google.android.gms:play-services-ads:11.2.2'
}
After update}
android {
compileSdkVersion 28
buildToolsVersion "28.0.0"
defaultConfig {
minSdkVersion 17
targetSdkVersion 28
...
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:appcompat-v7:27.+'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
implementation 'com.google.android.gms:play-services-ads:15.0.1'
}
You may need to change "Gradle Scripts" -> "build.gradle (Project:[your_project_name])"
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}