我在应用Firebase Analytics Integration
时会遇到以下错误02-21 17:32:59.447 12786-12786/? E/FA: GoogleService failed to initialize, status: 10, Missing google app id value from from string resources with name google_app_id.
02-21 17:32:59.447 12786-12786/? E/FA: Scheduler not set. Not logging error/warn
02-21 17:32:59.535 12786-12837/? E/FA: Missing google_app_id. Firebase Analytics disabled.
设置详细信息如下:
基本模块:
added google-services.json to base module.
apply plugin: 'com.google.gms.google-services'
api "com.google.firebase:firebase-core:${MOBILE_GMS_LIBRARY_VERSION}"
api 'com.google.gms:google-services:3.0.0'
应用模块:
apply plugin: 'com.google.gms.google-services'
请有什么建议?
添加到strings.xml
<string name="google_app_id">x:xxxxxx:android:xxxx</string>
02-21 17:32:59.535 12786-12837/? E/FA: Missing google_app_id. Firebase Analytics disabled.
我认为这是一个例外,解决此问题,尝试在firebase项目中启用firebase Analytic,然后根据您的软件包文件下载最新的Google.json文件,然后将其应用于您的Android项目。
google issuetracker
好消息!工程师在 Google-Services 的3.2.1
版本中有固定的Gradle同步故障问题。
我验证了评论#3中提供的项目可能成功用" com.google.gms:google-services:3.2.1
'"编译。