Previously, GCM was working fine but after updating Google Play Services it stopped working. I am encountered with the following logcat error:
java.lang.IncompatibleClassChangeError: The method 'java.io.File android.support.v4.content.ContextCompat.getNoBackupFilesDir(android.content.Context)' was expected to be of type virtual but instead was found to be of type direct (declaration of 'com.google.android.gms.iid.zzd' appears in /data/app/com.notnul.notnul-1/base.apk) at com.notnul.notnul.RegistrationIntentService.onHandleIntent(RegistrationIntentService.java:53)
And here is my code where logcat is pointing:
instanceID = InstanceID.getInstance(this);
GCM_Token = InstanceID.getInstance(getApplicationContext()).getToken(authorizedEntity, scope);
GCM_InstaceID = instanceID.getInstance(getApplicationContext()).getId();
I am unable to find the error. Can anyone help me regarding this? Thanks in advance!