Everything was working perfect in my project but know I get this message.
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
So I should add the google-service in my gradle file.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
and these are my dependencies.
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'
}
Basically I use the GoogleApiClient object to obtain my current location. I have nothing to do with Maps or GCM.
Any ideas how to fix this? I looked around here, but still there are problems.
Thanks.