【发布时间】:2016-11-12 11:19:55
【问题描述】:
这是我的 gradle.app 应用插件:'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
}
defaultConfig {
applicationId "com.example.joshpc.bluetoothattendee"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.google.android.gms:play-services-gcm:9.8.0'
compile 'com.google.gms:google-services:3.0.0'
compile 'com.google.firebase:firebase-auth:9.8.0'
compile 'com.google.firebase:firebase-core:9.8.0'
compile 'com.firebase:firebase-client-android:2.5.2'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
当我尝试运行我的 android 模拟器时,它给了我这个读数:
W/GooglePlayServicesUtil: Google Play services out of date. Requires 9877000 but found 9875480
我已尝试将 firebase 和 google play 服务恢复到 9.6.0,但由于 firebase 需要 9.8.0,所以这不起作用
我在独立 SDK 管理器中更新了我的 API 25 android 系统映像。
我的 google play 存储库是最新的。
如果我将我的 gradle 更改为调用 play services 9.8.7,它会给我错误:
所以当 SDK 说它是最新的并且我无法恢复所需的版本时,我不太确定如何解决这个问题或更新播放服务。 请注意,“安装存储库和同步”不可点击/不链接到任何东西。我检查了存储库版本及其最新
【问题讨论】:
-
见我的answer here
-
我目前正在尝试 API 24。看看它是否有效
-
看来您修复的错误与我收到的错误不同。它解决了firebase并创建了链接就好了,但错误与谷歌播放服务有关。
-
请不要转发。评论不碰撞。对问题进行编辑
标签: android firebase google-play-services