I'm getting an error:
Java.Lang.IllegalAccessError: Method 'void android.support.v4.content.ContextCompat.()' is inaccessible to class 'com.google.android.gms.iid.zzd'
in this segment of code:
try
{
lock (Locker)
{
var instanceId = InstanceID.GetInstance(this);
var token = instanceId.GetToken(SenderId, GoogleCloudMessaging.InstanceIdScope, null);
SendRegistrationToAppServer(token);
Subscribe(token);
}
}
catch
{
Log.Debug("RegistrationIntentService", "Failed to get a registration token");
}
I'm using latest Xamarin.Android.Support.v4 25.3.1 package and Google play services 29.0.0.2
I tried to update Google play services to latest 42.1021.1 but then I get the following exception:
java.lang.NoSuchMethodError: No static method zzz(Ljava/lang/Object;)Ljava/lang/Object; in class Lcom/google/android/gms/common/internal/zzx; or its super classes (declaration of 'com.google.android.gms.common.internal.zzx' appears in /data/app/com.draugas.dr-1/base.apk)
06-20 12:55:44.146 E/AndroidRuntime(11703): at com.google.android.gms.measurement.internal.zzw.zzaT(Unknown Source)
All information that I found about this error suggests that I tweak build.gradle file, but since xamarin does not have gradle files I'm not sure what to do.
Any help would be appreciated.