Failed to resolve 'com.google.firebase:firebase-messaging:11.0.4' in Android Studio 2.3.3

I have faced the same problem, I have resolved it by updating two things

  1. Google play service
  2. Google repository

enter image description here


Mr Jan, Please follow below link its clearly says that->

https://firebase.google.com/docs/android/setup#Prerequisites

Prerequisites-

  • A device running Android 4.0 (Ice Cream Sandwich) or newer, and Google Play services 11.6.0 or higher
  • The Google Play services SDK from the Google Repository, available in the Android SDK Manager
  • The latest version of Android Studio, version 1.5 or higher

So Upgrade your Google Play Services and Google Repository in SDK Manager

Open Android studio > Go to File > Settings > Appearance and Behavior > System Setting > Android SDK > SDK Tools > Update

1- Google Play Services and

2- Google Repository under Support Repository