Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

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

    Mobile and Embedded
    2
    4
    1145
    Loading More Posts
    • 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.
    • mmjvox
      mmjvox last edited by mmjvox

      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 Reply Quote 0
      • Quang Phu
        Quang Phu last edited by

        @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 Reply Quote 0
        • mmjvox
          mmjvox last edited by mmjvox

          @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 Reply Quote 0
          • mmjvox
            mmjvox last edited by

            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 Reply Quote 0
            • First post
              Last post