android apply plugin: 'com.google.gms.google-services'
Solved
Mobile and Embedded
-
wrote on 11 Jun 2020, 01:40 last edited by mmjvox 6 Nov 2020, 01:40
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 -
wrote on 12 Jun 2020, 07:32 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'
-
wrote on 25 Jun 2020, 20:59 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 usingimplementation '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
-
wrote on 29 Jun 2020, 00:23 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.