Error: fix the version conflict (google-services plugin)

Solution 1:

I think you change

compile 'com.google.firebase:firebase-messaging:11.0.4'

Solution 2:

Same error gets thrown when

apply plugin: 'com.google.gms.google-services'

is not added to bottom of the module build.gradle file.