GoogleService failed to initialize
You need to place the configuration file (google-services.json
) generated by developer.google.com, as mentioned in the 2nd step of the official docs here
The process is simple
- You can select your project or create a new one.
Then after selecting desired services (in this case the maps service), you can generate the configuration file.
For people who have migrated to the Firebase projects they can get the same by going to Firebase Console, selecting your project and under settings you will find the configuration file.
Then as quoted in step 3 of the official docs here
Copy the
google-services.json
file you just downloaded into the app/ or mobile/ directory of your Android
P.S : For people downvoting this answer, please do leave a comment as to why you are down voting it.
GoogleService failed to initialize, status: 10, Missing google app id value from from string resources with name google_app_id
I got the same error, not sure what's the root cause, but as a workaround found a solution.
Downgrade classpath 'com.google.gms:google-services:4.1.0'
to classpath 'com.google.gms:google-services:4.0.0'
and it should work, at least it did for me.
GoogleService failed to initialize, status: 10, Missing an expected resource: In Android
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
GoogleService failed to initialize in Google Cloud Message
Add your app id(get it from google console) and add it to string.xml
<!-- App id -->
<string name="google_app_id">appId</string>
GoogleService failed to initialize, status: 10
I think
- you should add the plugin to the bottom of your app-level
build.gradle
:
apply plugin: 'com.google.gms.google-services'
- Add the dependency to your project-level
build.gradle
:
classpath 'com.google.gms:google-services:1.5.0-beta2'
For more information Check this
Edited:
New build.gradle
looks like
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com..."
minSdkVersion 21
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.google.android.gms:play-services:8.4.0'
}
GoogleService failed to initialize because of missing dependency in gradle.
You need to generate and configure file from Developer.Google
google-services.json
file from this site.Open the Android Studio Terminal pane:
Alternativiely you can just press
ALT + F12
Type this line in
Terminal
- MAC/LINUX:
mv path-to-download/Downloads/google-services.json app/
- WINDOWS
move path-to-download/Downloads/google-services.json app/
1) Add the dependency to your project-level build.gradle:
compile 'com.google.gms:google-services:3.0.0'
2) Add the plugin to your app-level build.gradle:
apply plugin: 'com.google.gms.google-services'
note: below
dependencies{ ....... }
blog
- Then use Play service dependencies in app level
dependencies {
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.android.gms:play-services:9.0.1'
}
Related Topics
How to Play Videos in Android from Assets Folder or Raw Folder
Error Opening Supportmapfragment for Second Time
Latest Update on Enabling and Disabling Mobile Data Programmatically
Android Studio 0.4 Duplicate Files Copied in APK Meta-Inf/License.Txt
How to Access the Drawable Resources by Name in Android
How to Dynamically Set the Position of View in Android
How to Build an Executable for Android Shell
Passing Arraylist Through Intent
Changing Screen Brightness Programmatically (As with the Power Widget)
What Characters Allowed in File Names on Android
Nullpointerexception:Println Needs a Message in Android
Actionbar Not Shown with Appcompat
How to Deploy and Execute an Application on a Device Connected to a Remote System
Which Is the Best Way to Add a Button
How to Set a Gradient Background in a Material Button from Material Components