Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. android apply plugin: 'com.google.gms.google-services'
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 2 Posters 2.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mmjvox
    wrote on 11 Jun 2020, 01:40 last edited by mmjvox 6 Nov 2020, 01:40
    #1

    im trying to add

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

    to build.gradle but gradle cant build:

    > Task :preDebugBuild FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':preDebugBuild'.
    > 1
    

    befor that i added

    classpath 'com.google.gms:google-services:4.2.0'
    

    to dependencies and built successfully
    i even added google-services.json to android directory

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      Quang Phu
      wrote on 12 Jun 2020, 07:32 last edited by
      #2

      @mmjvox , this is my setting in build.gradle that worked well, you can refer it (Qt.5.14.1):

      buildscript {
          repositories {
              jcenter()
              google()
          }
      
          dependencies {
              classpath 'com.android.tools.build:gradle:3.5.0'
              classpath 'com.google.gms:google-services:3.0.0'
          }
      }
      apply plugin: 'com.google.gms.google-services'
      1 Reply Last reply
      0
      • M Offline
        M Offline
        mmjvox
        wrote on 25 Jun 2020, 20:59 last edited by mmjvox
        #3

        @Quang-Phu said in android apply plugin: 'com.google.gms.google-services':

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

        thaks.
        im using

        implementation 'com.android.support:appcompat-v7:28.0.0'
        

        i changed it to

        implementation 'com.android.support:appcompat-v7:27.1.1'
        

        and added

        multiDexEnabled = true
        

        to "defaultConfig" and my problem solved.

        But i don't know why in android studio there isn't any problem with 28.0.0

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mmjvox
          wrote on 29 Jun 2020, 00:23 last edited by
          #4

          Today i changed:

          implementation 'com.android.support:appcompat-v7:27.1.1'
          

          to

          implementation 'com.android.support:appcompat-v7:28.0.0'
          

          without change anything else
          and worked.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved