Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
348 views
in Technique[技术] by (71.8m points)

android - Failed to resolve: play-services-tasks

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...