If you are not able to run the project because you are getting error after an update of Android Gradle plugin in Android Studio.
Here I am giving you the complete solution. Please see below mention steps.
In your gradle file, use new dependency in configurations
Step-1: Go to the build.gradle(module app)
Step-2: Replace compile with an implementation
For Example:
dependencies { compile 'com.android.support:appcompat-v7:26.+'}
It should be
dependencies { implementation 'com.android.support:appcompat-v7:26.+'}
Step-3: Replace testCompile with testImplementation
For Example:
testCompile 'junit:junit:4.12'
It should be
testImplementation 'junit:junit:4.12'
Step-4: Replace androidTestCompile with androidTestImplementation
For Example:
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' })
It should be
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2',
{
exclude group: 'com.android.support', module: 'support-annotations'
})
Step-5: For library replace compile with api
Step-6: Change classpath com.google.gms:google-services to 'com.google.gms:google-services:3.2.0' (Use latest one)
Step-7: Invalidate Cache and Restart Application (File > Invalidate Cache)
Step-8: Delete .gradle folder
Step-9: Restart application
Enjoy it...