这是我的构建等级(应用程序(
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:26.+'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:26.+'
implementation 'com.android.support:support-v4:26.+'
implementation 'com.github.bumptech.glide:glide:3.8.0'
implementation 'com.android.support:recyclerview-v7:26.+'
testImplementation 'junit:junit:4.12'
implementation 'com.google.firebase:firebase-auth:9.0.2'
implementation 'com.google.firebase:firebase-messaging:17.0.0:15.0.0'
}
在构建分级(项目中(
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.google.gms:google-services:4.0.2'
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://maven.google.com" }
}
}
这是错误
无法解决:Firebase消息传递-15.0.0
Firebase 助手显示依赖项设置正确,但 Sycn 失败。请帮助我。
尝试将 Firebase 消息传递的版本更改为 17.3.2,例如
实现 'com.google.firebase:firebase-messaging:17.3.2'
更改以下内容:
implementation 'com.google.firebase:firebase-messaging:17.0.0:15.0.0'
进入这个:
implementation 'com.google.firebase:firebase-messaging:17.3.2'
组 IDcom.google.firebase
firebase-messaging
是项目 ID
版本17.3.2
在此处检查版本:
https://firebase.google.com/support/release-notes/android
要么使用implementation 'com.google.firebase:firebase-messaging:17.0.0'
要么使用implementation 'com.google.firebase:firebase-messaging:15.0.0'
按照 Firebase 的文档下载
implementation 'com.google.firebase:firebase-messaging:17.3.0'
删除
implementation 'com.google.firebase:firebase-messaging:17.0.0:15.0.0'
加
implementation 'com.google.firebase:firebase-database:17.0.0'