错误:无法解决:com.google.firebase:firebase-messaging:16.0.1 [英] ERROR: Failed to resolve: com.google.firebase:firebase-messaging:16.0.1

查看:101
本文介绍了错误:无法解决:com.google.firebase:firebase-messaging:16.0.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我添加Firebase云消息传递依赖性实施'com.google.firebase:firebase-messaging:16.0.1'时,我收到错误消息:错误:无法解决:com.google .firebase:firebase-messaging:16.0.1

When I add firebase cloud messaging depencency implementation 'com.google.firebase:firebase-messaging:16.0.1' I get a error : ERROR: Failed to resolve: com.google.firebase:firebase-messaging:16.0.1

我在这里的依赖:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.google.android.material:material:1.0.0-rc01'
    implementation 'com.android.support:design:28.0.1'
    implementation 'com.google.firebase:firebase-database:16.0.1'
    implementation "com.google.firebase:firebase-auth:16.0.1"
    implementation 'com.google.firebase:firebase-core:16.0.1'
    implementation 'com.google.firebase:firebase-messaging:16.0.1'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'me.spark:submitbutton:1.0.1'

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

我该如何解决?请帮助我.

How I can solved it? Please help me..

推荐答案

您正在尝试使用非常老的Firebase客户端库.最新版本列在发行说明中.您应该确保同时使用所有最新版本.

You're trying to use use very old Firebase client libraries. The latest versions are listed in the release notes. You should make sure to use all the most recent versions together.

implementation 'com.google.firebase:firebase-database:19.2.1'
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'com.google.firebase:firebase-messaging:20.1.0'

您也不应再使用firebase-core.如果您尝试使用Google Analytics(分析),请执行以下操作:

You should also no longer use firebase-core. If you are trying to use Analytics, do this instead:

implementation 'com.google.firebase:firebase-analytics:17.2.2'

这篇关于错误:无法解决:com.google.firebase:firebase-messaging:16.0.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆