我目前在生产中安装了一个Android应用,安装在超过3万台设备中,每天有3500人使用。 1个单个用户反复遇到此异常
WeakHashMap.java第806行
Fatal Exception: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.intent.action.SCREEN_OFF flg=0x50200010 (has extras) } in com.google.android.gms.ads.internal.util.bw@98afaa4
at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$-android_app_LoadedApk$ReceiverDispatcher$Args_52226(LoadedApk.java:1329)
at android.app.-$Lambda$FilBqgnXJrN9Mgyks1XHeAxzSTk.$m$0(-.java:4)
at android.app.-$Lambda$FilBqgnXJrN9Mgyks1XHeAxzSTk.run(-.java)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6942)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by java.util.ConcurrentModificationException
at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:806)
at java.util.WeakHashMap$EntryIterator.next(WeakHashMap.java:845)
at java.util.WeakHashMap$EntryIterator.next(WeakHashMap.java:844)
at com.google.android.gms.ads.internal.util.bv.a(bv.java:9)
at com.google.android.gms.ads.internal.util.bw.onReceive(bw.java:2)
at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$-android_app_LoadedApk$ReceiverDispatcher$Args_52226(LoadedApk.java:1319)
at android.app.-$Lambda$FilBqgnXJrN9Mgyks1XHeAxzSTk.$m$0(-.java:4)
at android.app.-$Lambda$FilBqgnXJrN9Mgyks1XHeAxzSTk.run(-.java)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6942)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
这肯定与我的代码无关,因为它指定了google.ads包
100%的崩溃来自:
Device
Brand: samsung
Model: SM-G570M
Orientation: Portrait
RAM free: 308.34 MB
Disk free: 12.12 GB
Operating System
Version: 8.0.0
Orientation: Portrait
Rooted: No
90%的时间设备应用处于后台状态
它发生在某些Google的api代码中,所以我无法抓住它...有人知道原因吗?我该怎么解决
答案 0 :(得分:0)
支持人员报告说他们已解决此崩溃问题https://groups.google.com/d/msg/google-admob-ads-sdk/ZRbDWmJ5Zjw/H9QaxjtGBAAJ
至少我在Crashlytics中看不到它。
答案 1 :(得分:-1)
我在com.google.android.gms中有同样的错误。请尝试区分您的图书馆。可能是您的问题得到解决。
implementation 'com.google.guava:guava:27.1-android'
androidTestImplementation("com.google.truth:truth:0.42")
{
exclude group: "com.google.guava", module: "guava"
}