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
Add in your app.gradle
allprojects { repositories { jcenter() maven { url "https://maven.google.com" } } }
and upgrade your dependencies version.