project level build.gradle file:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.0'
classpath 'com.google.gms:google-services:3.0.0'
}
}
[...]
Application-level build.gradle (much abridged, due to large numbers of irrelevant dependencies here):
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 24
buildToolsVersion "24.0.3"
}
ext {
supportLibraryVersion = '24.2.1'
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile "com.android.support:appcompat-v7:${supportLibraryVersion}"
compile 'com.google.android.gms:play-services-auth:9.8.0'
}
Gives me the following build errors:
google-services plugin could not detect any version for com.google.android.gms or com.google.firebase, default version: 9.0.0 will be used. please apply google-services plugin at the bottom of the build file.
FAILURE: Build failed with an exception.
- What went wrong: A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugApkCopy'. Could not find com.google.android.gms:play-services-auth:9.8.0. Required by: SpeechDemo:app:unspecified
I tried moving the "apply plugin" line for google-services to the very bottom line of the file, but other than removing the warning about it this changed nothing.
Any ideas how to make this work?