7

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''
Cœur
  • 37,241
  • 25
  • 195
  • 267
John
  • 1,407
  • 7
  • 26
  • 51

1 Answers1

1

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

Community
  • 1
  • 1
Anjali Tripathi
  • 1,477
  • 9
  • 28