WAIT. I know what you're thinking. Before you mark this as a 'duplicate', you need to know that ALL of the other posts I've seen have terrible answers that absolutely do not work for me. They might be outdated, I'm not sure, but all I know is that they don't work
So I have my gradle build in 'app'. It looks something like this:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.oneclicklearn.fastchat"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
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.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:25.3.1'
compile 'com.google.firebase:firebase-database:3.1.0'
compile 'com.google.firebase:messaging:3.1.0'
compile 'com.google.firebase:auth:3.1.0'
}
apply plugin: 'com.google.gms.google-services'
I can include a screenshot here as well. You can see ALL my files here:
Now I will list the links that seem to be unhelpful:
- Could not find com.google.gms:google-services:9.0,0 This question is outdated
- How to fix Error:Could not find com.google.gms: google-services: 3.0.0.? This question's answers simply did not work
I hope this was enough info for you. Feel free to comment if you need me to say more!