Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GoogleService failed to initialize, status: 10, Missing an expected resource: In Android

Tags:

android

Signed APK is getting below Error

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.

when I run the same code with Dubug.APK it's working fine.

below is build.gradle file

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.android.support:cardview-v7:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'com.google.android.gms:play-services-location:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services-analytics:8.4.0' }}apply plugin: 'com.google.gms.google-services''
like image 597
John Avatar asked Jan 29 '16 10:01

John


1 Answers

You have miss to add google-service.json file. As I know you have created your app on google Developer from there you need to download the google-service.json file and put it into your app folder

Step for putting google-service.json to app folder:

1) in android studio double tap the shift button and search for terminal 
2) $ mv path-to-download/google-services.json app/ for Ubuntu/MAC OS 
3) For google-service.json use generate file button from this link 

https://developers.google.com/identity/sign-in/android/start-integrating

for more detail please refer below link GoogleService failed to initialize

like image 139
Anjali Tripathi Avatar answered Nov 07 '22 12:11

Anjali Tripathi