GoogleService failed to initialize, status: 10, Missing google app id value from from string resources with name google_app_id

情到浓时终转凉″ 提交于 2020-01-04 04:11:11

问题


Im getting this error out of nowhere it used to work just fine. Here is what i have:

in app.gradle dependencies:

implementation "com.google.firebase:firebase-core:16.0.1"
implementation "com.google.firebase:firebase-messaging:17.3.1"

in app.gradle end of file:

apply plugin: 'com.google.gms.google-services'

in project gradle file:

 dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0-alpha10'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'io.fabric.tools:gradle:1.+'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.google.gms:google-services:4.1.0'
    }

And the google-services.json is located in about every folder of my project just to see if it is working.

but still getting the above error.


回答1:


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.




回答2:


After updating to Android Studio 3.3 I started getting the same error. It turns out version 4.1.0 of com.google.gms:google-services had a known issue in Android Studio 3.3.

Updating to com.google.gms:google-services:4.2.0 solved the problem for me.



来源:https://stackoverflow.com/questions/52374463/googleservice-failed-to-initialize-status-10-missing-google-app-id-value-from

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!