-
Notifications
You must be signed in to change notification settings - Fork 602
Firestore v24.4.3, ClassNotFoundException: com.google.firebase.annotations.concurrent.Background #4680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@adaonder Can you share the dependencies you have in your app's Also: is this happening in a debug or release version of your app? Do you have proguard enabled? |
error in debug My build.gradle; apply plugin: 'com.android.application' android { dependencies {
} |
proguard-rules-> -keep class com.xxx.yyy.databinding.** { ; } -keep class androidx.** { ; } |
I'm still getting the same error. I just run, it explodes. |
I'm also getting this same error on launch in both debug and release builds. No proguard rules. java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/annotations/concurrent/Background; Firebase dependencies: |
@adaonder Thank you for sharing your dependencies. I managed to reproduce the error and it seems like we currently have a problem in projects that are not using the Firebase Bill of Materials (BoM). I'll work with the team to fix this. In the meantime, may I suggest that you upgrade to the BoM? As described in the docs, by using the BoM you no longer need to specify each version on the dependencies: // Import the BoM
implementation platform('com.google.firebase:firebase-bom:31.2.1')
implementation 'com.google.firebase:firebase-storage'
implementation 'com.google.firebase:firebase-auth'
// (firebase-core is no longer needed)
implementation 'com.google.firebase:firebase-firestore'
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics' It should fix your issue and prevent from running into similar issues in the future. |
@pblowers It seems like you're not using the BoM correctly - you're missing the implementation(platform("com.google.firebase:firebase-bom:31.2.1"))
implementation("com.google.firebase:firebase-crashlytics")
implementation("com.google.firebase:firebase-analytics") |
That did it for me, thank you very much! |
Hi all, our engineer have created #4683 which contains details of what's currently happening regarding the issue, and the current workaround. That said, for better tracking we'll keep that issue open and mark this one as duplicate. For others who experience the same issue, if you have any further questions, please follow up on the said post. Thanks! |
Thanks for your support. |
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
app is not opening
Steps to reproduce:
app is not opening
Log:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.globme.launcher, PID: 18837
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/annotations/concurrent/Background;
at com.google.firebase.installations.FirebaseInstallationsRegistrar.getComponents(FirebaseInstallationsRegistrar.java:45)
at com.google.firebase.tracing.ComponentMonitor.processRegistrar(ComponentMonitor.java:28)
at com.google.firebase.components.ComponentRuntime.discoverComponents(ComponentRuntime.java:117)
at com.google.firebase.components.ComponentRuntime.(ComponentRuntime.java:99)
at com.google.firebase.components.ComponentRuntime.(ComponentRuntime.java:46)
at com.google.firebase.components.ComponentRuntime$Builder.build(ComponentRuntime.java:387)
at com.google.firebase.FirebaseApp.(FirebaseApp.java:437)
at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:303)
at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:271)
at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:256)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(FirebaseInitProvider.java:51)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1801)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1776)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(FirebaseInitProvider.java:45)
at android.app.ActivityThread.installProvider(ActivityThread.java:5427)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5000)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4940)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1549)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5728)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.annotations.concurrent.Background" on path: DexPathList[[zip file "/data/app/com.globme.launcher-1/base.apk"],nativeLibraryDirectories=[/data/app/com.globme.launcher-1/lib/arm64, /vendor/lib64, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.google.firebase.installations.FirebaseInstallationsRegistrar.getComponents(FirebaseInstallationsRegistrar.java:45)
at com.google.firebase.tracing.ComponentMonitor.processRegistrar(ComponentMonitor.java:28)
at com.google.firebase.components.ComponentRuntime.discoverComponents(ComponentRuntime.java:117)
at com.google.firebase.components.ComponentRuntime.(ComponentRuntime.java:99)
at com.google.firebase.components.ComponentRuntime.(ComponentRuntime.java:46)
at com.google.firebase.components.ComponentRuntime$Builder.build(ComponentRuntime.java:387)
at com.google.firebase.FirebaseApp.(FirebaseApp.java:437)
at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:303)
at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:271)
at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:256)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(FirebaseInitProvider.java:51)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1801)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1776)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(FirebaseInitProvider.java:45)
at android.app.ActivityThread.installProvider(ActivityThread.java:5427)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5000)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4940)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1549)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5728)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Suppressed: java.lang.ClassNotFoundException: com.google.firebase.annotations.concurrent.Background
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 26 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
The text was updated successfully, but these errors were encountered: