Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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



  • 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



  • @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'


  • @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



  • 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.


Log in to reply