0
我添加火力,以我的应用程序,并在日志中我看到这一点:GoogleService初始化失败,但所有的设置是正确的
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.
但我google-services.json
文件在app /目录,这是我的gradle产出:
buildscript {
repositories {
jcenter()
mavenLocal()
}
dependencies {
classpath 'com.google.gms:google-services:3.0.0'
}
}
apply plugin: 'com.android.application'
repositories {
jcenter()
mavenLocal()
}
android {
....
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile('com.crashlytics.sdk.android:crashlytics:[email protected]') {
transitive = true;
}
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'com.android.support:support-v4:24.2.1'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.google.android.gms:play-services-auth:9.6.0'
compile 'com.google.android.gms:play-services-appindexing:9.6.0'
compile 'com.google.firebase:firebase-core:9.6.0'
compile 'com.google.firebase:firebase-messaging:9.6.0'
}
apply plugin: 'com.google.gms.google-services'