我正在尝试将OneSignal推送通知包含到我的Xamarin安卓应用中,在OneSignal面板中它说有一个设备可以访问但是当我运行我的应用程序时(索尼Xperia E5303)它说:
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
我已经检查了谷歌播放服务版本,它是11.7.46,似乎已更新。 我该如何解决这个错误?