【发布时间】:2016-11-12 21:08:15
【问题描述】:
这是我的 gradle.app
apply plugin: '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,它会给我错误:
如果我将 GPS 降级到 9.6.0,我会得到:
W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
所以当 SDK 说它是最新的并且我无法恢复所需的版本时,我不太确定如何解决这个问题或更新播放服务。 请注意,“安装存储库和同步”不可点击/不链接到任何东西。我检查了存储库版本及其最新
我在模拟器中检查了版本,它运行的是 9.8.75
【问题讨论】:
-
compile 'com.google.gms:google-services:3.0.0'不应该在那里 -
删除了它。还在扔
Google Play services out of date. Requires 9877000 but found 9875470 -
'com.firebase:firebase-client-android:2.5.2'是旧的 Firebase。你在哪里看到添加的? -
老实说,youtube。将其更新为
compile 'com.google.firebase:firebase-database:9.8.0'仍然抛出错误 -
嗯,首先,9.8.0 is the latest,所以我不知道你为什么尝试
9.8.7
标签: android gradle firebase google-play-services