Class cast exception to same class on Android

后端 未结 1 1391
星月不相逢
星月不相逢 2020-12-09 04:21

I\'m having a strange problem with ClassCastException on Android. One class cannot be casted to the same class:

java.lang.RuntimeException: Unable to start a         


        
1条回答
  •  醉梦人生
    2020-12-09 04:59

    Ok I where the problem is. Looks like Samsung on Android 5.0 probably still uses old implementation of multidex (used in Android L Preview), so if your app exceeds the 64k limit, it will crash in random places on your app where you use (ExampleClass) object cast.

    More info on this problem can be found here and here.

    We're also seeing this crash happen thousands of times per day. Crashlytics reports the crash as 100% Samsung devices (99% "SM G900F[Q]" device), and 100% Android 5.x. Seems to be another multidex issue on Samsung + Lollipop devices, as a.jaskev reports in #3.

    Looks like we have to wait until Samsung resolve this problem. Right now all we can do is watching our spam on mailbox with bug reports :)

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