appsflyer-react-native-plugin icon indicating copy to clipboard operation
appsflyer-react-native-plugin copied to clipboard

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

Open audrius-sav opened this issue 1 year ago • 2 comments

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?

audrius-sav avatar May 14 '24 12:05 audrius-sav

👋 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 [email protected]. When submitting the ticket, please specify:

  • ✅ your AppsFlyer sign-up (account) email
  • ✅ app ID
  • ✅ production steps
  • ✅ logs
  • ✅ code snippets
  • ✅ and any additional relevant information.

github-actions[bot] avatar May 14 '24 13:05 github-actions[bot]

I also encountered this problem. Is this necessary to add 'com.google.android.gms:play-services-ads-identifier:18.0.1'?

dryyy27 avatar Oct 14 '24 03:10 dryyy27

Here is the doc about it - https://dev.appsflyer.com/hc/docs/testing-android#the-log-shows-warning-google-play-services-is-missing

msuhov avatar Jan 16 '25 17:01 msuhov

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Jul 26 '25 10:07 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Aug 10 '25 10:08 github-actions[bot]