Plugin with id 'com.google.gms.google-services' not found

南笙酒味 提交于 2020-12-10 07:36:07

问题


I am using google services at the very first time in my app(ionic platform). I am following this doc. While building my app, I got the following error message. Please help out. Thank you.

A problem occurred evaluating script.

Plugin with id 'com.google.gms.google-services' not found.


回答1:


Please add the plugin to your project by updating your top-level build.gradle and your app-level build.gradle files as follows:

  1. Add the dependency to your project-level build.gradle:
classpath 'com.google.gms:google-services:3.0.0'
  1. Add the plugin to your app-level build.gradle:
apply plugin: 'com.google.gms.google-services'

More information regarding this can be found in GCM - Set up a GCM Client App on Android.

And, in addition to that, the guide or workaround given in GitHub - GCMPushPlugin might also help.




回答2:


Add   classpath com.google.gms:google-services:3.0.0  dependencies at project level build.gradle

Refer the sample block from project level build.gradle

buildscript {
    repositories {
        jcenter()
    }
    dependencies {

        classpath 'com.android.tools.build:gradle:2.3.3'
        classpath 'com.google.gms:google-services:3.0.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}


来源:https://stackoverflow.com/questions/38611257/plugin-with-id-com-google-gms-google-services-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!