0

This is the error showing while exceuting InstanceID instanceID;

'android.app.AppOpsManager', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zzb
    07-25 15:08:54.919 19852-19874/? E/AndroidRuntime: FATAL EXCEPTION: IntentService[]
                                                       java.lang.IncompatibleClassChangeError: android.support.v4.content.ContextCompat
                                                           at com.google.android.gms.iid.zzd.zzdL(Unknown Source)
                                                           at com.google.android.gms.iid.zzd.<init>(Unknown Source)
                                                           at com.google.android.gms.iid.zzd.<init>(Unknown Source)
                                                           at com.google.android.gms.iid.InstanceID.zza(Unknown Source)
                                                           at com.google.android.gms.iid.InstanceID.getInstance(Unknown Source)
                                                           at nath.prem.com.premgcmproject.GCMRegistrationIntentService.registerGCM(GCMRegistrationIntentService.java:60)
                                                           at nath.prem.com.premgcmproject.GCMRegistrationIntentService.onHandleIntent(GCMRegistrationIntentService.java:41)
                                                           at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
                                                           at android.os.Handler.dispatchMessage(Handler.java:99)
                                                           at android.os.Looper.loop(Looper.java:153)
                                                           at android.os.HandlerThread.run(HandlerThread.java:60)
    07-25 15:08:54.961 520-539/? E/AppErrorDialog: Failed to get 
prem nath
  • 75
  • 1
  • 12
  • This type of error is usually an indication that there is a mismatch between the SDK that is being used and the version of Google Play services that is available on the device. Try updating the Google Play services on the device and see if that helps. – Arthur Thompson Jul 26 '16 at 18:33

1 Answers1

0

Try adding this in your dependencies in build.gradle

compile 'com.android.support:appcompat-v7:23.4.0'

This SO post - IncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM might help you as well.

Community
  • 1
  • 1
Teyam
  • 7,686
  • 3
  • 15
  • 22