How to apply google cloud messaging services with firebase 10.0.1 error solution


While implementing firebase version 10.0.1 in android studio while enabling google cloud messaging services there encounter certain errors of conflict between older version of google play services and the new firebase version, this can lead to debugging error and even memory overflow, these error can be resolved by making certain updates to google play services and even if the problem is not fixed then the solution is to just remove google play services and implement the same type of firebase services in its place, so i am going to give you code to implement firebase services or the GCM services v10.0.1 and this is the code in build.gradle file of the project


dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:support-v4:23.4.0'
    compile 'com.google.android.gms:play-services-ads:10.0.1'
    compile 'com.google.android.gms:play-services-gcm:10.0.1'
    compile 'com.google.firebase:firebase-appindexing:10.0.1'
    compile 'com.google.firebase:firebase-messaging:10.0.1'
    compile 'com.google.firebase:firebase-database:10.0.1'
    compile 'com.google.firebase:firebase-storage:10.0.1'
    compile 'com.google.firebase:firebase-crash:10.0.1'
    compile 'com.google.firebase:firebase-auth:10.0.1'
    compile 'com.google.firebase:firebase-config:10.0.1'
    compile 'com.google.firebase:firebase-invites:10.0.1'
    compile 'com.google.firebase:firebase-core:10.0.1'
    testCompile 'junit:junit:4.12'
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

So the above code shows various firebase services but you can use what you need in your project accordingly, such as if your project does not require storage services of firebase then you can remove that code from compilation.