Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

google_app_id missing and Google services failed to inittialize

Tags:

java

android

I've imported a project from my desktop which is already built and runnig. but when try in my computer,it is giving me the below errors. what does google app id mean? what might be the cause for such type of errors. thanks in advance.

logcat:

02-08 13:14:46.328 23043-23043/ E/GMPM: GoogleService failed to initialize, status: 10, Missing an expected resource: 'R.string.google_app_id' for initializing Google services.  Possible causes are missing google-services.json or com.google.gms.google-services gradle plugin.
02-08 13:14:46.328 23043-23043/ E/GMPM: Scheduler not set. Not logging error/warn.
02-08 13:14:46.358 23043-23073/ E/GMPM: Uploading is not possible. App measurement disabled
02-08 13:14:46.500 23043-23043/E/F: NO ACCOUNT ID
like image 504
shiva allani Avatar asked Dec 07 '22 23:12

shiva allani


2 Answers

If you recently update your Android Studio to 3.3.1 that have a problem with com.google.gms:google-services (Below 4.2.0) dependencies So please update com.google.gms:google-services to 4.2.0

dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.google.gms:google-services:4.2.0'
}
like image 23
Himanshu Avatar answered Mar 23 '23 00:03

Himanshu


may be you forgot add

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

to the bottom of build.gradle.

and you can get more info at https://firebase.google.com/docs/android/setup

like image 123
zkywalker Avatar answered Mar 23 '23 01:03

zkywalker