Latest Firestore Quickstart encounters NoClassDefFoundError: CredentialsOptions$Builder #1647
Open
Description
opened on Aug 5, 2024
Step 1: Describe your environment
- Android device: Android Emualtor
- Android OS version: Android 11
- Google Play Services version: 21.2.0
- Firebase/Play Services SDK version: 33.1.2
Step 2: Describe the problem:
Steps to reproduce:
- Download Quickstart
- Run Firestore
Observed Results:
- What happened? This could be a description,
logcat
output, etc.
2024-08-05 19:12:58.712 7297-7297 AndroidRuntime com...gle.firebase.example.fireeats E FATAL EXCEPTION: main
Process: com.google.firebase.example.fireeats, PID: 7297
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/auth/api/credentials/CredentialsOptions$Builder;
at com.firebase.ui.auth.util.GoogleApiUtils.getCredentialsClient(GoogleApiUtils.java:29)
at com.firebase.ui.auth.viewmodel.AuthViewModelBase.onCreate(AuthViewModelBase.java:30)
at com.firebase.ui.auth.viewmodel.ViewModelBase.init(ViewModelBase.java:24)
at com.firebase.ui.auth.KickoffActivity.onCreate(KickoffActivity.java:38)
at android.app.Activity.performCreate(Activity.java:8000)
at android.app.Activity.performCreate(Activity.java:7984)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.auth.api.credentials.CredentialsOptions$Builder" on path: DexPathList[[zip file "/data/app/~~jxILtii72sMxj9gULZghyg==/com.google.firebase.example.fireeats-HCrLOYixLfszxtdVOEXyiw==/base.apk"],nativeLibraryDirectories=[/data/app/~~jxILtii72sMxj9gULZghyg==/com.google.firebase.example.fireeats-HCrLOYixLfszxtdVOEXyiw==/lib/x86, /system/lib, /system_ext/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.firebase.ui.auth.util.GoogleApiUtils.getCredentialsClient(GoogleApiUtils.java:29)
at com.firebase.ui.auth.viewmodel.AuthViewModelBase.onCreate(AuthViewModelBase.java:30)
at com.firebase.ui.auth.viewmodel.ViewModelBase.init(ViewModelBase.java:24)
at com.firebase.ui.auth.KickoffActivity.onCreate(KickoffActivity.java:38)
at android.app.Activity.performCreate(Activity.java:8000)
at android.app.Activity.performCreate(Activity.java:7984)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Expected Results:
- What did you expect to happen?
- Should work normally.
Relevant Information:
According to this Stack Overflow thread,com.google.android.gms:play-services-auth
of version 21.2.0
no longer uses Credentials API. Mitigation for now is downgrading to version 20.7.0
.
Metadata
Assignees
Labels
No labels
Activity