I was using dragger 1 in my project. then add firebase crashlytics and found duplicate files issue So I used this. but Now I am getting this error. I found this here but not helpful for me.
2020-05-20 17:06:09.574 9586-9586/com.gaggleamp.app.staging E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.gaggleamp.app.staging, PID: 9586
java.lang.NoClassDefFoundError: Failed resolution of: Ldagger/internal/Preconditions;
at com.google.android.datatransport.runtime.DaggerTransportRuntimeComponent$Builder.setApplicationContext(com.google.android.datatransport:transport-runtime@@2.2.1:106)
at com.google.android.datatransport.runtime.DaggerTransportRuntimeComponent$Builder.setApplicationContext(com.google.android.datatransport:transport-runtime@@2.2.1:101)
at com.google.android.datatransport.runtime.TransportRuntime.initialize(com.google.android.datatransport:transport-runtime@@2.2.1:77)
at com.google.firebase.crashlytics.internal.send.DataTransportCrashlyticsReportSender.create(com.google.firebase:firebase-crashlytics@@17.0.0:52)
at com.google.firebase.crashlytics.internal.common.SessionReportingCoordinator.create(com.google.firebase:firebase-crashlytics@@17.0.0:65)
at com.google.firebase.crashlytics.internal.common.CrashlyticsController.<init>(com.google.firebase:firebase-crashlytics@@17.0.0:335)
at com.google.firebase.crashlytics.internal.common.CrashlyticsCore.onPreExecute(com.google.firebase:firebase-crashlytics@@17.0.0:165)
at com.google.firebase.crashlytics.FirebaseCrashlytics.init(com.google.firebase:firebase-crashlytics@@17.0.0:78)
at com.google.firebase.crashlytics.CrashlyticsRegistrar.buildCrashlytics(com.google.firebase:firebase-crashlytics@@17.0.0:55)
at com.google.firebase.crashlytics.CrashlyticsRegistrar.access$lambda$0(Unknown Source:0)
at com.google.firebase.crashlytics.CrashlyticsRegistrar$$Lambda$1.create(Unknown Source:2)
at com.google.firebase.components.ComponentRuntime.lambda$new$0(com.google.firebase:firebase-components@@16.0.0:69)
at com.google.firebase.components.ComponentRuntime$$Lambda$1.get(Unknown Source:4)
at com.google.firebase.components.Lazy.get(com.google.firebase:firebase-components@@16.0.0:53)
at com.google.firebase.components.ComponentRuntime.initializeEagerComponents(com.google.firebase:firebase-components@@16.0.0:158)
at com.google.firebase.FirebaseApp.initializeAllApis(com.google.firebase:firebase-common@@19.3.0:563)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@19.3.0:304)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@19.3.0:268)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@19.3.0:253)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@19.3.0:51)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1919)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1894)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@19.3.0:45)
at android.app.ActivityThread.installProvider(ActivityThread.java:6285)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5851)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5772)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1661)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.ClassNotFoundException: Didn't find class "dagger.internal.Preconditions" on path: DexPathList[[zip file "/data/app/com.gaggleamp.app.staging-JheBVuTpjNJI2GauxExCcA==/base.apk"],nativeLibraryDirectories=[/data/app/com.gaggleamp.app.staging-JheBVuTpjNJI2GauxExCcA==/lib/x86, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
2020-05-20 17:06:09.575 9586-9586/com.gaggleamp.app.staging E/AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 34 more