I'm currently using Google Maps on a app that I'm developing and suddenly my app started to throw an error when I run the app on my phone.
10-22 22:19:41.921 26626-26626/? 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.
I have seen similar post regarding this issue and I've tried most of those solutions. The majority suggest to add apply plugin: 'com.google.gms.google-services'
at the end of the app.gradle
along with classpath 'com.google.gms:google-services:3.0.0'
on my apps gradle.
I' also have the google-services.json
added on the path app/
None of these solutions have worked, does anyone has another workaround?
These are my current gradles
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
App specific gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.josebernhardt.rpvc_"
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.google.android.gms:play-services:8.4.0'
}