My project refresh is failing with the error for the below gradle script: Error:Configuration with name 'compile' not found.
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
classpath 'com.google.gms:google-services:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply plugin: 'com.google.gms.google-services'
Remove apply plugin: 'com.google.gms.google-services' from project/build.gradle and put it in your app/build.gradle
apply plugin: 'com.android.application'
android {
...
..
}
dependencies {
....
..
}
apply plugin: 'com.google.gms.google-services'
paste apply plugin: 'com.google.gms.google-services' at the bottom of build.gradle(module app) and compile 'com.google.firebase:firebase-core:12.0.0' into dependencies of build.graddle(module app)
remove plugin: 'com.google.gms.google-services' from build.gradle(project name)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With