I am having this issue, can anyone help me to sort this out ?

I was having the same error and after checking, It was the issue of the gcm version which I specify to compile the latest one and added this piece of code solve my issue.
instead of:
compile ('com.google.android.gms:play-services-gcm:8.1.0')
and use:
compile ('com.google.android.gms:play-services-gcm:+')
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.
Most helpful comment
I was having the same error and after checking, It was the issue of the gcm version which I specify to compile the latest one and added this piece of code solve my issue.
instead of:
and use: