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

后端 未结 8 1525
夕颜
夕颜 2021-02-19 02:44

I followed google documentation to integrate my app to Google Analytics. But when adding

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

and b

相关标签:
8条回答
  • 2021-02-19 03:16

    Need to enter the following entry in both gradle:

    1. Add the following to the @project level gradle file:

      classpath 'com.android.tools.build:gradle:1.3.0'
          classpath 'com.google.gms:google-services:3.0.0'
      
    2. Add the following to the @app level gradle file:

      // Dependency for Google Sign-In
      compile 'com.google.android.gms:play-services-auth:9.4.0'
      
    3. Add plugin:

      apply plugin: 'com.google.gms.google-services'
      
    0 讨论(0)
  • 2021-02-19 03:16

    Add the following to the @project level gradle file:

        classpath 'com.android.tools.build:gradle:2.3.0'
        classpath 'com.google.gms:google-services:3.0.0'
    
    0 讨论(0)
  • 2021-02-19 03:16

    I was having this exact issue, and the following fixed it.. go to platforms>android>project.properties and edit the lines

    cordova.system.library.5=com.google.android.gms:play-services-auth:+
    cordova.system.library.6=com.google.android.gms:play-services-identity:+
    

    to

    cordova.system.library.5=com.google.android.gms:play-services-auth:11.0.1
    cordova.system.library.6=com.google.android.gms:play-services-identity:11.0.1
    

    It is said that # Do not modify this file -- YOUR CHANGES WILL BE ERASED! But this fixed my issue

    0 讨论(0)
  • 2021-02-19 03:30

    Sometimes, you have to update your REALM-PLUGIN and you need to write this in Top-Level Gradle (Project:Gradle), copy paste below "classpath" line:

    buildscript {
      ... 
      dependencies {
        classpath 'io.realm:realm-gradle-plugin:7.0.0' //<--Your answer.
      }
    }
    
    0 讨论(0)
  • 2021-02-19 03:33

    Replace the line compile 'com.google.android.gms:play-services-gcm:+'

    with the following compile 'com.google.android.gms:play-services-gcm:8.4.0'

    in the application build.gradle file.

    0 讨论(0)
  • 2021-02-19 03:36

    At first you should call

        dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'
        classpath 'com.google.gms:google-services:2.0.0-alpha2'
    }
    

    Don't (Avoid calling +)

    compile 'com.google.android.gms:play-services-gcm:+'
         compile 'com.google.android.gms:play-services:8.4.0'
    

    Do

         compile 'com.google.android.gms:play-services:8.4.0'
    
    0 讨论(0)
提交回复
热议问题