AppsFlyerSDK / appsflyer-react-native-plugin

AppsFlyer plugin for React Native
MIT License
273 stars 196 forks source link

[Android] Google Play Services is missing com.google.android.gms.ads.identifier.AdvertisingIdClient #554

Open audrius-sav opened 2 months ago

audrius-sav commented 2 months ago

Report

Plugin Version

6.14.3

On what Platform are you having the issue?

Android

What did you do?

yarn add react-native-appsflyer yarn android

add to JS: appsFlyer.initSdk( { devKey: 'DEV_KEY' isDebug: true, onInstallConversionDataListener: true, //Optional onDeepLinkListener: true, //Optional }

What did you expect to happen?

Launch event to be logged in LogCat without errors

What happened instead?

Launch event is logged in LogCat and seen later in dashboard, but with error after Trying to fetch GAID...:

[Other] Google Play Services is missing com.google.android.gms.ads.identifier.AdvertisingIdClient java.lang.ClassNotFoundException: com.google.android.gms.ads.identifier.AdvertisingIdClient at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:536) at java.lang.Class.forName(Class.java:467) at com.appsflyer.internal.AFf1uSDK.valueOf(:271) at com.appsflyer.internal.AFf1uSDK.AFInAppEventParameterName(:193) at com.appsflyer.internal.AFf1uSDK.afInfoLog(:162) at com.appsflyer.internal.AFf1uSDK.AFKeystoreWrapper(:116) at com.appsflyer.internal.AFe1dSDK.AFLogger(:207) at com.appsflyer.internal.AFe1cSDK$1.run(:186) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487) at java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) at java.lang.Thread.run(Thread.java:1012) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.identifier.AdvertisingIdClient" on path: DexPathList[[zip file "/data/app/~~KTS6tb4BTdH5t6nZVdJ83g==/com.APPNAME-GgyCLBMQTmnrUSwrs1svZw==/base.apk"],nativeLibraryDirectories=[/data/app/~~KTS6tb4BTdH5t6nZVdJ83g==/com.APPNAME-GgyCLBMQTmnrUSwrs1svZw==/lib/arm64, /data/app/~~KTS6tb4BTdH5t6nZVdJ83g==/com.APPNAME-GgyCLBMQTmnrUSwrs1svZw==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at java.lang.Class.classForName(Native Method)  at java.lang.Class.forName(Class.java:536)  at java.lang.Class.forName(Class.java:467)  at com.appsflyer.internal.AFf1uSDK.valueOf(:271)  at com.appsflyer.internal.AFf1uSDK.AFInAppEventParameterName(:193)  at com.appsflyer.internal.AFf1uSDK.afInfoLog(:162)  at com.appsflyer.internal.AFf1uSDK.AFKeystoreWrapper(:116)  at com.appsflyer.internal.AFe1dSDK.AFLogger(:207)  at com.appsflyer.internal.AFe1cSDK$1.run(:186)  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)  at java.util.concurrent.FutureTask.run(FutureTask.java:264)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)  at java.lang.Thread.run(Thread.java:1012)

[Other] WARNING: Google Play Services is missing.

Also later in logs before [Other] LAUNCH-6: preparing data, it logs the line [Other] No OAID library.

Please provide any other relevant information.

When I add implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1' to my app's build.gradle I don't see this error anymore, but it's not mentioned anywhere in the appsflyer docs or the example project.

Also by adding this dependency, [Other] No OAID library is still logged.

I don't understand, is this dependency needed and makes a difference? Or is this error OK?

github-actions[bot] commented 2 months ago

👋 Hi @audrius-sav and Thank you for reaching out to us. In order for us to provide optimal support, please submit a ticket to our support team at support@appsflyer.com. When submitting the ticket, please specify: