I know that this question of mine has been asked many times and I did follow most of the answers but none of those helped me. So this is my problem, whenever I sync my proje
compile 'com.google.android.gms:play-services-location:9.4.0'
compile 'com.google.android.gms:play-services-appindexing:9.4.0'
compile 'com.google.firebase:firebase-messaging:9.2.0'
compile 'com.google.firebase:firebase-database:9.0.2'
Not sure this is the culprit, but you got pretty mess with used versions here. Try to use recent versions or at least the same for all components related.
This tool may help you stay in sync in future: https://github.com/ben-manes/gradle-versions-plugin