I know it has been asked a lot of times here but no matter how much answers I search It keeps happenning ever since I updated android studio to the new stable version.
I've updated every single SDK Tool and confirmed that Google Play Services is installed. I've even tested with classpath 3.0.0 and 3.1.0 and lot of firebase compile versions but still happens and I don't know what more to do.
Update:
I got this error after updating gradle to v3 and then reversing it to 2.3.3 becasue some compatibility issues
I've noticed that some people report that the same error tells them that It has tried looking for the plugin in some repositories, but mine just doesn't
Here is my build config:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.0'
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven { url 'http://dl.bintray.com/amulyakhare/maven' }
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And the Project one:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.appsr.appname"
minSdkVersion 18
targetSdkVersion 25
versionCode 122
versionName "2.2.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
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:25.4.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:25.4.0'
compile 'com.android.support:support-vector-drawable:25.4.0'
compile 'com.android.support:recyclerview-v7:25.4.0'
compile 'com.android.support:cardview-v7:25.4.0'
//Preferences
compile 'com.android.support:preference-v7:25.4.0'
compile 'com.takisoft.fix:preference-v7:25.4.0.0' //Bugfix preference library
//HttpClient
compile 'com.squareup.okhttp3:okhttp:3.8.1'
compile 'com.github.franmontiel:PersistentCookieJar:v1.0.1'
compile 'org.jsoup:jsoup:1.9.2'
//Serialize classes in JSON
compile 'com.google.code.gson:gson:2.8.0'
//Others
compile 'com.google.android.gms:play-services-drive:11.6.2'
compile 'com.google.firebase:firebase-core:11.6.2'
compile 'com.google.firebase:firebase-crash:11.6.2'
compile 'com.google.firebase:firebase-messaging:11.6.2'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'