sadegh nordeh
Member
In our application with the package name com.example.testapp, we are experiencing a crash when using the Google Play Services Ads Identifier. The crash occurs on devices running Android versions below API 26. The error log is as follows:
Request:
Please investigate and provide a solution or guidance on how to safely use the Google Ads Identifier library on devices with API levels below 26 without causing a crash.
Analysis:Fatal Exception: java.lang.NoClassDefFoundError
Failed resolution of: Ljava/time/Duration;
com.google.android.gms.ads.identifier.zzd.<clinit> (com.google.android.gmslay-services-ads-identifier@@18.2.0:1)
java.lang.Thread.run (Thread.java:818)
Caused by java.lang.ClassNotFoundException
Didn't find class "java.time.Duration" on path: DexPathList[[zip file "/data/app/com.example.testapp-1/base.apk", ... ]]
- The crash is caused by the usage of java.time.Duration, which is only available on Android API 26 and above.
- The library play-services-ads-identifier is not compatible with devices running lower API levels.
- We are using the latest version of the AdMob library, the latest Android SDK, and B4A version 3.40.
Request:
Please investigate and provide a solution or guidance on how to safely use the Google Ads Identifier library on devices with API levels below 26 without causing a crash.