Firebase assistants error: Failed to resolve: firebase-messaging-15.0.0

跟風遠走 提交于 2019-12-25 00:17:03

问题


I am currently facing the error when i try to connect to the Cloud Messaging using firebase assistants.

Failed to resolve: firebase-messaging-15.0.0

I search online, and the solution was to remove the last few digits in the dependency. However, when i tried that, it solved the error, but on the firebase assistants, it did not show "dependency being set up correctly" anymore. Hence, does this mean that i am not connected to the firebase cloud messaging?

Method tried: change from implementation 'com.google.firebase:firebase-messaging:17.0.0:15.0.0' to implementation 'com.google.firebase:firebase-messaging:17.0.0'

The dependency being set up correctly is in green before i use the online method of removing the last few digits of the dependency


回答1:


You are getting the following error:

Failed to resolve: firebase-messaging-15.0.0

Because you are using a wrong dependency in your code. To solve this, please change the following line of code:

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

to

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

Because such a version 17.0.0:15.0.0 does not exist. Here you can find more informations.

In your top level build.gradle file please be sure to have the latest version of Google Service plugin and Gradle:

classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'



回答2:


remove all firebase-messaging dependency and add This Dependency

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


来源:https://stackoverflow.com/questions/53219484/firebase-assistants-error-failed-to-resolve-firebase-messaging-15-0-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!