Friday, 1 July 2022

Error getting google ad id Xamarin

I'm trying to include OneSignal push notification into my Xamarin android app, In OneSignal panel it says that there is a device reachable but when I run my application on (Sony Xperia E5303) it says :

Error getting Google Ad id:

[OneSignal] java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/ads/identifier/AdvertisingIdClient;

[OneSignal] at com.onesignal.AdvertisingIdProviderGPS.getIdentifier(AdvertisingIdProviderGPS.java:39)

[OneSignal] at com.onesignal.OneSignal$6.run(OneSignal.java:631)

[OneSignal] at java.lang.Thread.run(Thread.java:818)

[OneSignal] Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.identifier.AdvertisingIdClient" on path: DexPathList[[zip file "/data/app/com.app.app.app-1/base.apk"],nativeLibraryDirectories=[/data/app/com.app.app.app-1/lib/arm64, /data/app/com.app.app.app-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]

[OneSignal] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)

[OneSignal] at java.lang.ClassLoader.loadClass(ClassLoader.java:511)

[OneSignal] at java.lang.ClassLoader.loadClass(ClassLoader.java:469)

[OneSignal] ... 3 more

[OneSignal] Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.ads.identifier.AdvertisingIdClient

[OneSignal] at java.lang.Class.classForName(Native Method)

[OneSignal] at java.lang.BootClassLoader.findClass(ClassLoader.java:781)

[OneSignal] at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)

[OneSignal] at java.lang.ClassLoader.loadClass(ClassLoader.java:504)

[OneSignal] ... 4 more

I've already checked google play services version, it is 11.7.46, seems updated. How can I solve this error?



from Error getting google ad id Xamarin

No comments:

Post a Comment