Android Studio 3.1.0 - Configuration 'compile' is obsolete and has been replaced wit 'implementation

Hello Everyone,

I am doing my Final Year Project (FYP) and today I updated my Gradle version on Android Studio to 3.1.0 and I am not sure how to solve this error: “Configuration ‘compile’ is obsolete and has been replaced with ‘implementation’.
It will be removed at the end of 2018”. 

I also have this application where my application “Keeps Stopping” when I run it. OVER AND OVER!!! Could you please help me? Anyone?

5 Likes

I am also facing the same issue from today after the new update:

Configuration ‘compile’ is obsolete and has been replaced with ‘implementation’.
It will be removed at the end of 2018

The problem lies in the build.gradle file - apply plugin: ‘com.google.gms.google-services’

The Google Services plugin is adding a dependency on behalf of you. Hopefully they fix it in the future.

1 Like

Is there no solution for it then? What can I do for my project then? Thank you very much for replying!

1 Like

I just checked: I have ‘apply plugin: com.android.application’. Should I change that?

2 Likes

having the same issues. And everytime I’m running the application no update is done. The IDE just installs previously compiled APK. I tried checking by changing many things but it lead to more errors and without errors also it is not making any changes when I run the app.

1 Like

when ??? …

Hi!

You just need to change the ‘compile’ by ‘implementation’ in the ‘Build.Gradle’ on module app.

:wink:

76 Likes

Worked for me, thanks!!

7 Likes

Hello,

Please can you show me which line ?

Thank you

1 Like

This worked for me too! Thanks!

I tried, but it gave me error when changed to line 4. Could you explain which line and what places to change please? I am a beginner and compile is written in more places at BuildGradle, module app.

I changed at line 29 and the configuration worked PERFECTLY!!! Thank you very much!!! :smileyvery-happy:

Worked for me ! :slight_smile:

applyplugin:'com.android.application'  
  
android {
compileSdkVersion27  
buildToolsVersion'27.0.3'  
  
defaultConfig {
applicationId"com.example.android.<font size="3"><em><strong>PUT YOUR APPLICATION NAME HERE</strong></em></font>"  
minSdkVersion15  
targetSdkVersion27  
versionCode1  
versionName"1.0"  
testInstrumentationRunner"android.support.test.runner.AndroidJUnitRunner"  
  
}
buildTypes {
release {applyplugin:'com.android.application'  
  
android {
compileSdkVersion27  
defaultConfig {
applicationId"com.example.android.myapplication"  
minSdkVersion15  
targetSdkVersion27  
versionCode1  
versionName"1.0"  
testInstrumentationRunner"android.support.test.runner.AndroidJUnitRunner"  
}
buildTypes {
release {
minifyEnabledfalse  
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'  
}
}
}

dependencies {
implementation fileTree(dir:'libs',include: ['\*.jar'])
implementation'com.android.support:appcompat-v7:27.1.0'  
implementation'com.android.support.constraint:constraint-layout:1.0.2'  
testImplementation'junit:junit:4.12'  
androidTestImplementation'com.android.support.test:runner:1.0.1'  
androidTestImplementation'com.android.support.test.espresso:espresso-core:3.0.1'  
}

minifyEnabledfalse  
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'  
}
}
}

dependencies {
implementation fileTree(dir:'libs',include: ['\*.jar'])
implementation'com.android.support:appcompat-v7:27.1.0'  
implementation'com.android.support.constraint:constraint-layout:1.0.2'  
implementation'com.android.support:support-fragment:27.1.1'  
  
testImplementation'junit:junit:4.12'  
androidTestImplementation'com.android.support.test:runner:1.0.1'  
androidTestImplementation'com.android.support.test.espresso:espresso-core:3.0.1'  
//compile 'com.android.support:appcompat-v7:25.1.1'  
 //compile 'com.android.support:design:25.1.1'  
implementation'com.android.support:design:27.1.1'  
}
1 Like

Thanks,it worked 4 me

1 Like

Ah yes worked for me! Thank you so much. :) 

thanks, it just gives a solution. Lovely 

change it to what?

Old teach me???

completed successfully 1m 30s 484ms
Run build 1m 29s 850ms
Load build 5ms
Configure build 944ms
Calculate task graph 2s 927ms
Run tasks 1m 25s 920ms
null  
Configuration 'compile' is obsolete and has been replaced with 'implementation'.  
D:/Android/Material-Design-UI-Template-master