Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Firebase Crashlytics, missing com.crashlytics.android.Crashlytics, app crash

Discussion in 'Formats & External Tools' started by andrew_pearce_, Apr 3, 2019.

  1. andrew_pearce_

    andrew_pearce_

    Joined:
    Nov 5, 2018
    Posts:
    167
    Hello,

    For almost 48 hours, I am trying to fix problem with missing crashlytics class:

    Caused by java.lang.ClassNotFoundException: Didn't find class "com.crashlytics.android.Crashlytics" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/system/lib, /vendor/lib, /system/lib, /vendor/lib]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:74)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)


    The line number seems to be 53, 56, 93, 74, 125, 134. The funniest part is that I am getting reports that Crashlytics is missing by Crashlytics itself =) So if it's missing then who is reporting me about app crash? I tried to enable multidex like it was suggested here: https://appmediation.com/unity-enable-multidex/

    I also tried to add custom proguard file as it was suggested here: https://stackoverflow.com/questions/43774062/crashlytics-unity-plugin-export-to-android-studio

    I am still getting this crash reports. On my own mobile devices everything seems to be working. The error happens on 1% of users' device. The Android vary from 4-8, the manufacturer also is different in each case. By analyzing log events sent by analytics, I can see that sometimes it crashes at start (while checking if Firebase is ready), other times in the middle of the game.

    I tried Firebase SDK 5.4, 5.5 and now testing 5.6... Did anyone face any issues or should I simply remove Crashlytics and use something else?

    Thanks
     
  2. andrew_pearce_

    andrew_pearce_

    Joined:
    Nov 5, 2018
    Posts:
    167
    I will answer my own question. So I tried 5.6 and there was the same problem on some mobiles. Finally, I decided to try Crashlytics from Fabric and it seems to be working fine. So if you are looking for stable implementation of Crashlytics in your app, you can give it a try as well. Good luck!
     
  3. andrew_pearce_

    andrew_pearce_

    Joined:
    Nov 5, 2018
    Posts:
    167
    I should mention that at first everything was fine but now I start see missing Crashlytics despite that I am using Fabric. That's so sarcastic, Crashlytics should help me resolve issues while the amount of crashes increased since I added it. So I have no other option than remove it and implement my own code to track none fatal errors. Plus fatal errors which cause crashes usually is supplied with useless information, so you have zero chance to find what caused it.
     
  4. MiguelCurwen

    MiguelCurwen

    Joined:
    Dec 11, 2018
    Posts:
    3
    I am having the same problem using Crashlytics as well:


    Caused by java.lang.ClassNotFoundException
    Didn't find class "com.crashlytics.android.Crashlytics" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]

    dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:56)

    java.lang.ClassLoader.loadClass (ClassLoader.java:511)

    java.lang.ClassLoader.loadClass (ClassLoader.java:469)



    With users not being able to start the game on android, with firebase plugin 5.6
     
  5. Emirk

    Emirk

    Joined:
    Nov 26, 2012
    Posts:
    17
    Exact same issue here. Trying to enable multidex now and see if that works, otherwise I'll just remove the crashlytics SDK.
     
  6. andrew_pearce_

    andrew_pearce_

    Joined:
    Nov 5, 2018
    Posts:
    167
    Guys I updated Firebase SDK (since AdMob had issues with old one) to latest (it was released couple of weeks ago) and it worked fine for me. Also I did not need to enable MultiDex support, everything worked out of box.