Conflict with firebase 11.8.0 and google-services plugin 3.1.2

六眼飞鱼酱① 提交于 2019-12-01 23:49:05

The solution is to move this line to the bottom of the app build.gradle file (it shouldn't be at the top):

apply plugin: 'com.google.gms.google-services'

This is specified in the documentation:

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 plugin:

apply plugin: 'com.android.application'

android {
  // ...
}

dependencies {
  // ...
  compile 'com.google.firebase:firebase-core:11.8.0'

  // Getting a "Could not find" error? Make sure you have
  // added the Google maven respository to your root build.gradle
}

// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!