[Question] Firebase - NoClassDefFoundError at startup
What is your question?
Hi We are experiencing an issue with Firebase 11.8.1. We are building aab with multidex and split application binary enabled.
The build seems to crash at startup with this error:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/Preconditions; at com.google.firebase.provider.FirebaseInitProvider.checkContentProviderAuthority(FirebaseInitProvider.java:85)
I leave here a screenshot with more information about the log. Is anyone experiencing this issue?
We are running out of idea
Firebase Unity SDK Version
11.8.1
Unity editor version
2022.3.20f1, 2022.3.19f1
Installation Method
.unitypackage
Problematic Firebase Component(s)
Analytics, Crashlytics
Other Firebase Component(s) in use
No response
Additional SDKs you are using
Facebook, OneSignal, GoogleSignIn
Targeted Platform(s)
Android
Unity editor platform
Mac, Windows
Scripting Runtime
IL2CPP
Release Distribution Type
Pre-built SDK from https://firebase.google.com/download/unity
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Hey @rossojr92, thanks for reaching out. NoClassDefFoundError is usually caused by unable find a class definition on runtime, meaning there was an issue during the compilation. I'm suspecting that the issue might be a conflict in the dependencies. Could you try the solution in #927 and #688?
Let me know if that helps. Thanks!
Hi for sure it's something in dependencies. Regarding the #927 and #688: #927 --> this is a compilation problem. Our build phase is fine. Our crash happen at runtime #688 --> The solution here seems to enable Custom Main Gradle Template and Custom Gradle Properties to properly resolve dependencies conficts.
Unfortunately, we are already using Custom Main Gradle Template and Custom Gradle Properties. The resolution phase is succeeding all the time.
Does it exists a way to log conflicts or something similar during dependencies resolution?
We might need to dig deeper, could you provide an MCVE? Thanks!
Hey @rossojr92. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@rossojr92 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.