我的应用使用play-services-ads:18.2.0
。
在Android API低于28的设备上,会显示以下错误日志:
I/DynamiteModule: Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:300
I/DynamiteModule: Selected remote version of com.google.android.gms.ads.dynamite, version >= 300
W/DynamiteModule: Dynamite loader version < 2, falling back to loadModule2
I/DynamiteModule: Considering local module com.google.android.gms.measurement.dynamite:7 and remote module com.google.android.gms.measurement.dynamite:0
I/DynamiteModule: Selected local version of com.google.android.gms.measurement.dynamite
W/Ads: #007 Could not call remote method. @28
com.google.android.gms.internal.ads.zzaxj: com.google.android.gms.dynamite.DynamiteModule$LoadingException: Failed to instantiate module class: com.google.android.gms.ads.measurement.DynamiteMeasurementManager
at com.google.android.gms.internal.ads.zzaxh.zza(com.google.android.gms:play-services-ads-lite@@18.2.0:3)
at com.google.android.gms.internal.ads.zzajp.zza(com.google.android.gms:play-services-ads-lite@@18.2.0:17)
at com.google.android.gms.internal.ads.zzajp.zzd(com.google.android.gms:play-services-ads-lite@@18.2.0:44)
at com.google.android.gms.internal.ads.zzajo.run(com.google.android.gms:play-services-ads-lite@@18.2.0)
at java.lang.Thread.run(Thread.java:818)
Caused by: com.google.android.gms.dynamite.DynamiteModule$LoadingException: Failed to instantiate module class: com.google.android.gms.ads.measurement.DynamiteMeasurementManager
at com.google.android.gms.dynamite.DynamiteModule.instantiate(Unknown Source)
at com.google.android.gms.internal.ads.zzaxh.zza(com.google.android.gms:play-services-ads-lite@@18.2.0:1)
at com.google.android.gms.internal.ads.zzajp.zza(com.google.android.gms:play-services-ads-lite@@18.2.0:17)
at com.google.android.gms.internal.ads.zzajp.zzd(com.google.android.gms:play-services-ads-lite@@18.2.0:44)
at com.google.android.gms.internal.ads.zzajo.run(com.google.android.gms:play-services-ads-lite@@18.2.0)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.measurement.DynamiteMeasurementManager" on path: DexPathList[[zip file "/data/data/com.google.android.gms/app_chimera/m/00000031/AdsDynamite.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at ad.loadClass(:com.google.android.gms.dynamite_dynamiteloader@12874009@12.8.74 (020308-204998136):6)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.google.android.gms.dynamite.DynamiteModule.instantiate(Unknown Source)
at com.google.android.gms.internal.ads.zzaxh.zza(com.google.android.gms:play-services-ads-lite@@18.2.0:1)
at com.google.android.gms.internal.ads.zzajp.zza(com.google.android.gms:play-services-ads-lite@@18.2.0:17)
at com.google.android.gms.internal.ads.zzajp.zzd(com.google.android.gms:play-services-ads-lite@@18.2.0:44)
at com.google.android.gms.internal.ads.zzajo.run(com.google.android.gms:play-services-ads-lite@@18.2.0)
at java.lang.Thread.run(Thread.java:818)
Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.ads.measurement.DynamiteMeasurementManager
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at ae.loadClass(:com.google.android.gms.dynamite_dynamiteloader@12874009@12.8.74 (020308-204998136):130)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 8 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
此错误日志是在调用Application.onCreate()
之前写入的。
(可能是在清单解析时)。
是否可以修复这些错误,例如通过添加一些依赖项?