Configuration ‘compile’ is obsolete and has been replaced with ‘implementation’ and ‘api’

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

Gradle build Error – Configuration ‘compile’ is obsolete and has been replaced with ‘implementation’ and ‘api’ : In Android studio while adding dependency like recylerview, cardview or any other dependencies in gradle.build(module app), we will add latest dependencies into gradle.

Like

compile ‘com.android.support:cardview-v7:27.1.1’

compile ‘com.android.support:recyclerview-v7:27.1.1’

compile’com.android.support:appcompat-v7:27.1.1′

compile ‘com.google.code.gson:gson:2.6.2’

compile ‘com.squareup.retrofit2:retrofit:2.0.2’

compile ‘com.squareup.retrofit2:converter-gson:2.0.2

 

While adding dependencies like above show structure/format and  while synchronizing, if it throws an error “Configuration ‘compile’ is obsolete and has been replaced with ‘implementation’ and ‘api’. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html”. 

Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'

To fix this error in Gradle building, Replace “compile” to “implementation”, as shown below

Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'

implementation ‘com.android.support:cardview-v7:27.1.1’

implementation ‘com.android.support:recyclerview-v7:27.1.1’

implementation’com.android.support:appcompat-v7:27.1.1′

Click Sync Now, this little change in gradle file makes to fix error gradle error.

Any problem in fixing error, comment below

Learn Android for beginners – Complete source code download

Programs:

Android Fragment Example | Whatsapp Model

Android Intent Service (Vibrate Phone)

Android Program – Intent Action

Explicit Intent In Android | Switching With Data

Android Sqlite Database Example

Android Button onclick

Android Program – Navigation Drawer

Android Program – Wifi Activity

Android Program – Drawable shape resource

Android Program – Email Activity

Android Program – Options Menu

Android Program – Context Menu

Android Program – Notification

Android Seekbar

Android Ratingbar

Android Radio Button

Android Program -Touch Activity

Android Program – Time Picker

Android Program – Date Activity

Android Program – Audio Player

Android Program – Call Dial

Android Program – Camera

Android Spinner

Android Listview

Android Checkbox

Android Toast

To Learn Android – Click Below

Android for Beginners source code download 

 

 

Related Search

warning: configuration ‘compile’ is obsolete and has been replaced with ‘implementation’, Configuration ‘compile’ is obsolete and has been replaced with ‘implementation’ and ‘api’, gradle implementation vs api, android gradle implementation, android gradle plugin

Leave a Comment

Comments

No comments yet. Why don’t you start the discussion?

    Comments