【发布时间】:2016-01-29 10:04:42
【问题描述】:
签名的 APK 低于错误
GoogleService 初始化失败,状态:10,缺少预期的资源:用于初始化 Google 服务的“R.string.google_app_id”。可能的原因是缺少 google-services.json 或 com.google.gms.google-services gradle 插件。
当我使用 Dubug.APK 运行相同的代码时,它运行良好。
下面是 build.gradle 文件
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.android.support:cardview-v7:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'com.google.android.gms:play-services-location:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services-analytics:8.4.0' }}apply plugin: 'com.google.gms.google-services''
【问题讨论】:
-
为什么你不仔细阅读你的错误信息。它声明您必须创建一个字符串资源
R.string.google_app_id。 -
我添加了相同的字符串但得到相同的错误
标签: android