java.util.ConcurrentModificationException in activity onCreate

后端 未结 5 1906
情话喂你
情话喂你 2020-12-03 00:38

In a recent release where I added MoPub via Admob ad mediation I am seeing a bunch of ConcurrentModificationException in crash logs. It all seems to be native code and I am

相关标签:
5条回答
  • 2020-12-03 01:06

    Revert your Firebase Core library to:

    implementation 'com.google.firebase:firebase-core:17.1.0'
    

    I've seen this crash on both v17.2.1 and v17.2.2, but since reverting to 17.1.0 all has been fine.

    I've reported the bug here: https://firebase.google.com/support/troubleshooter/report/bugs

    Update

    Thanks @Sébastien, reverting to v17.2.0 should also work:

    implementation 'com.google.firebase:firebase-core:17.2.0'
    
    0 讨论(0)
  • 2020-12-03 01:09

    We've identified the issue, and are working on a fix for the next release of the SDK.

    0 讨论(0)
  • 2020-12-03 01:11

    It is finally fixed in 17.2.3: https://firebase.google.com/support/release-notes/android#analytics_v17-2-3

    0 讨论(0)
  • 2020-12-03 01:13

    We have recently encountered a similar problem. Error in the Unity Ads adapter for Admob mediation.

    Here is our build.gradle file:

    implementation 'com.google.android.gms:play-services-ads:19.1.0'
    implementation 'com.google.ads.mediation:unity:3.4.2.1'
    implementation 'com.google.ads.mediation:vungle:6.5.3.0'
    implementation 'com.google.ads.mediation:chartboost:7.5.0.0'
    implementation 'com.google.ads.mediation:mytarget:5.6.3.0'
    implementation 'com.yandex.android:mobmetricalib:3.13.1'
    implementation 'com.yandex.android:mobileads:2.142'
    implementation 'com.yandex.ads.adapter:admob-mobileads:0.3.0'
    
    implementation 'com.google.android.gms:play-services-games:19.0.0'
    implementation 'com.google.android.gms:play-services-auth:17.0.0'
    
    implementation 'com.google.firebase:firebase-analytics:17.3.0'
    implementation 'com.google.firebase:firebase-dynamic-links:19.1.0'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
    
    implementation 'com.google.android.play:core:1.7.2'
    implementation 'androidx.multidex:multidex:2.0.1'
    

    Error in Google Play console:

    java.util.ConcurrentModificationException: 
      at java.util.HashMap$HashIterator.nextNode (HashMap.java:1453)
      at java.util.HashMap$EntryIterator.next (HashMap.java:1487)
      at java.util.HashMap$EntryIterator.next (HashMap.java:1485)
      at com.google.ads.mediation.unity.UnitySingleton$UnitySingletonListener.onUnityAdsError (UnitySingleton.java:227)
      at com.unity3d.services.ads.configuration.AdsModuleConfiguration$3.run (AdsModuleConfiguration.java:92)
      at android.os.Handler.handleCallback (Handler.java:888)
      at android.os.Handler.dispatchMessage (Handler.java:100)
      at android.os.Looper.loop (Looper.java:213)
      at android.app.ActivityThread.main (ActivityThread.java:8178)
      at java.lang.reflect.Method.invoke (Native Method)
      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:513)
      at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1101)
    

    Is this problem related to firebase again?

    UPDATE

    It looks like the problem this time is in the UnityAds adapter: https://developers.google.com/admob/android/mediation/unity#version-3.4.2.2

    0 讨论(0)
  • 2020-12-03 01:16

    In our case, we are only seeing the crash with

    com.google.firebase:firebase-analytics:17.2.2 
    

    reverting to 17.2.1 has fixed the problem

    This happens too if you are using firebase-core:17.2.2, because firebase-analytics is the same library rebranded. Take into account that as per official docs, current usage of firebase-core is deprecated -> https://firebase.google.com/support/release-notes/android#latest_sdk_versions

    0 讨论(0)
提交回复
热议问题