无法解决:firebase-messaging-15.0.0

时间:2018-10-02 07:55:10

标签: android firebase firebase-cloud-messaging

这是我的构建gradle(应用程序)

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'

}

在构建gradle(项目)中

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-messaging-15.0.0

Firebase助手显示依赖项设置正确,但是Sycn失败。请帮助我。

5 个答案:

答案 0 :(得分:4)

尝试将Firebase消息传递的版本更改为17.3.2之类的

  

实现'com.google.firebase:firebase-messaging:17.3.2'

答案 1 :(得分:1)

更改此:

implementation 'com.google.firebase:firebase-messaging:17.0.0:15.0.0'

对此:

implementation 'com.google.firebase:firebase-messaging:17.3.2'

com.google.firebase是组ID

firebase-messaging是工件ID

17.3.2是版本

在此处检查版本:

https://firebase.google.com/support/release-notes/android

答案 2 :(得分:0)

使用implementation 'com.google.firebase:firebase-messaging:17.0.0'implementation 'com.google.firebase:firebase-messaging:15.0.0'

答案 3 :(得分:0)

按照firebase的文档,您可以使用

进行下载
implementation 'com.google.firebase:firebase-messaging:17.3.0'

答案 4 :(得分:0)

删除

implementation 'com.google.firebase:firebase-messaging:17.0.0:15.0.0'

添加

implementation 'com.google.firebase:firebase-database:17.0.0'