I have been tryong to add FCM to my android application for almost 48 hours now. I am keep on failing with these two errors on Android Studio. I have tried all the solutions in this post. Still I couldn't fix it.
I want firebase cloud messaging to be integrated in my app. So I did the followings.
- Created an app in the firebase console
- Included the .json config file
- Added the SDK
implementation 'com.google.firebase:firebase-messaging:17.0.0'
(In the app level gradle)
apply plugin: 'com.google.gms.google-services'
(In the app level gradle file last
line)
classpath 'com.google.gms:google-services:4.0.1'
(In the project level gradle)
- Added the repository
google()
(In the project level gradle)
I have tried syncing many times and I keep on getting the error
Failed to resolve: play-services-tasks Open File
Failed to resolve: play-services-basement Open File
On a side note, I am using the gradle plugin 3.1.3
classpath 'com.android.tools.build:gradle:3.1.3'
Can someone please give me a hand here please.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…