Found com.google.firebase:firebase-core:11.8.0, but version 11.4.2 is needed for the google-services plugin.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 11.4.2.
解决方法是将此行移到应用程序 build.gradle 文件的底部(它不应该在顶部):
1
apply plugin: 'com.google.gms.google-services'
这是在文档中指定的:
https://firebase.google.com/docs/android/setup
Then, in your module Gradle file (usually the app/build.gradle), add
the apply plugin line at the bottom of the file to enable the Gradle