匕首柄中的单例出现 NoClassDefFoundError

问题描述 投票:0回答:0

我有一个抽象类

abstract class AccessEnablerDelegate : IAccessEnablerDelegate {}

在另一个类上使用 dagger 作为单例

@Singleton
class AdobePassAuthentication @Inject constructor(@ApplicationContext private val appContext: Context) :
AccessEnablerDelegate() {}

我遇到的错误

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/viewlift/adobepass/AdobePassAuthentication;
at com.viewlift.DaggerAppCMSApplication_HiltComponents_SingletonC$SingletonCImpl$SwitchingProvider.get(DaggerAppCMSApplication_HiltComponents_SingletonC.java:1758)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at com.viewlift.adobepass.presentation.viewmodel.TVEProviderViewModel.setAdobePassListener(TVEProviderViewModel.kt:205)
at com.viewlift.adobepass.presentation.viewmodel.TVEProviderViewModel.getAuthentication(TVEProviderViewModel.kt:252)
at com.viewlift.adobepass.presentation.viewmodel.TVEProviderViewModel.mapIntents(TVEProviderViewModel.kt:84)
at com.viewlift.adobepass.presentation.viewmodel.TVEProviderViewModel.mapIntents(TVEProviderViewModel.kt:45)
at com.viewlift.core.base.BaseViewModel$1$1.invokeSuspend(BaseViewModel.kt:47)
at com.viewlift.core.base.BaseViewModel$1$1.invoke(BaseViewModel.kt)
at com.viewlift.core.base.BaseViewModel$1$1.invoke(BaseViewModel.kt)
at kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapConcat$$inlined$map$1$2.emit(Emitters.kt:223)
at kotlinx.coroutines.flow.SharedFlowImpl.collect$suspendImpl(SharedFlow.kt:382)
at kotlinx.coroutines.flow.SharedFlowImpl$collect$1.invokeSuspend(SharedFlow.kt)
                                                                                                    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
Caused by: java.lang.ClassNotFoundException: com.viewlift.adobepass.AdobePassAuthentication
at java.lang.VMClassLoader.findLoadedClass(Native Method)
at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:742)
at java.lang.ClassLoader.loadClass(ClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.viewlift.DaggerAppCMSApplication_HiltComponents_SingletonC$SingletonCImpl$SwitchingProvider.get(DaggerAppCMSApplication_HiltComponents_SingletonC.java:1758) 
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47) 
at com.viewlift.adobepass.presentation.viewmodel.TVEProviderViewModel.setAdobePassListener(TVEProviderViewModel.kt:205) 
at com.viewlift.adobepass.presentation.viewmodel.TVEProviderViewModel.getAuthentication(TVEProviderViewModel.kt:252) 
at com.viewlift.adobepass.presentation.viewmodel.TVEProviderViewModel.mapIntents(TVEProviderViewModel.kt:84) 
at com.viewlift.adobepass.presentation.viewmodel.TVEProviderViewModel.mapIntents(TVEProviderViewModel.kt:45) 
at com.viewlift.core.base.BaseViewModel$1$1.invokeSuspend(BaseViewModel.kt:47) 
at com.viewlift.core.base.BaseViewModel$1$1.invoke(BaseViewModel.kt) 
at com.viewlift.core.base.BaseViewModel$1$1.invoke(BaseViewModel.kt) 
at kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapConcat$$inlined$map$1$2.emit(Emitters.kt:223) 
                                                                                                    at kotlinx.coroutines.flow.SharedFlowImpl.collect$suspendImpl(SharedFlow.kt:382) 
                                                                                                    at kotlinx.coroutines.flow.SharedFlowImpl$collect$1.invokeSuspend(SharedFlow.kt) 
                                                                                                    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 
                                                                                                    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) 
                                                                                                    at android.os.Handler.handleCallback(Handler.java:751) 
                                                                                                    at android.os.Handler.dispatchMessage(Handler.java:95) 
                                                                                                    at android.os.Looper.loop(Looper.java:154) 
                                                                                                    at android.app.ActivityThread.main(ActivityThread.java:6200) 
                                                                                                    at java.lang.reflect.Method.invoke(Native Method) 
                                                                                                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:911) 
                                                                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:801) 
                                                                                                Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/viewlift/adobepass/delegate/AccessEnablerDelegate;
                                                                                                    at com.viewlift.DaggerAppCMSApplication_HiltComponents_SingletonC$SingletonCImpl$SwitchingProvider.get(DaggerAppCMSApplication_HiltComponents_SingletonC.java:1758) 
                                                                                                    at dagger.internal.DoubleCheck.get(DoubleCheck.java:47) 
                                                                                                    at com.viewlift.adobepass.presentation.viewmodel.TVEProviderViewModel.setAdobePassListener(TVEProviderViewModel.kt:205) 
                                                                                                    at com.viewlift.adobepass.presentation.viewmodel.TVEProviderViewModel.getAuthentication(TVEProviderViewModel.kt:252) 
                                                                                                    at com.viewlift.adobepass.presentation.viewmodel.TVEProviderViewModel.mapIntents(TVEProviderViewModel.kt:84) 
                                                                                                    at com.viewlift.adobepass.presentation.viewmodel.TVEProviderViewModel.mapIntents(TVEProviderViewModel.kt:45) 
                                                                                                    at com.viewlift.core.base.BaseViewModel$1$1.invokeSuspend(BaseViewModel.kt:47) 
                                                                                                    at com.viewlift.core.base.BaseViewModel$1$1.invoke(BaseViewModel.kt) 
                                                                                                    at com.viewlift.core.base.BaseViewModel$1$1.invoke(BaseViewModel.kt) 
                                                                                                    at kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapConcat$$inlined$map$1$2.emit(Emitters.kt:223) 
                                                                                                    at kotlinx.coroutines.flow.SharedFlowImpl.collect$suspendImpl(SharedFlow.kt:382) 
                                                                                                    at kotlinx.coroutines.flow.SharedFlowImpl$collect$1.invokeSuspend(SharedFlow.kt) 
                                                                                                    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 
                                                                                                    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) 
                                                                                                    at android.os.Handler.handleCallback(Handler.java:751) 
                                                                                                    at android.os.Handler.dispatchMessage(Handler.java:95) 
                                                                                                    at android.os.Looper.loop(Looper.java:154) 
                                                                                                    at android.app.ActivityThread.main(ActivityThread.java:6200) 
                                                                                                    at java.lang.reflect.Method.invoke(Native Method) 
                                                                                                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:911) 
                                                                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:801) 
                                                                                                Caused by: java.lang.ClassNotFoundException: com.viewlift.adobepass.delegate.AccessEnablerDelegate
                                                                                                    at java.lang.VMClassLoader.findLoadedClass(Native Method)
                                                                                                    at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:742)
                                                                                                    at java.lang.ClassLoader.loadClass(ClassLoader.java:362)
                                                                                                    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
                                                                                                    at com.viewlift.DaggerAppCMSApplication_HiltComponents_SingletonC$SingletonCImpl$SwitchingProvider.get(DaggerAppCMSApplication_HiltComponents_SingletonC.java:1758) 
                                                                                                    at dagger.internal.DoubleCheck.get(DoubleCheck.java:47) 
                                                                                                    at com.viewlift.adobepass.presentation.viewmodel.TVEProviderViewModel.setAdobePassListener(TVEProviderViewModel.kt:205) 
                                                                                                    at com.viewlift.adobepass.presentation.viewmodel.TVEProviderViewModel.getAuthentication(TVEProviderViewModel.kt:252) 
                                                                                                    at com.viewlift.adobepass.presentation.viewmodel.TVEProviderViewModel.mapIntents(TVEProviderViewModel.kt:84) 
                                                                                                    at com.viewlift.adobepass.presentation.viewmodel.TVEProviderViewModel.mapIntents(TVEProviderViewModel.kt:45) 
                                                                                                    at com.viewlift.core.base.BaseViewModel$1$1.invokeSuspend(BaseViewModel.kt:47) 
                                                                                                    at com.viewlift.core.base.BaseViewModel$1$1.invoke(BaseViewModel.kt) 
                                                                                                    at com.viewlift.core.base.BaseViewModel$1$1.invoke(BaseViewModel.kt) 
                                                                                                    at kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapConcat$$inlined$map$1$2.emit(Emitters.kt:223) 
                                                                                                    at kotlinx.coroutines.flow.SharedFlowImpl.collect$suspendImpl(SharedFlow.kt:382) 
                                                                                                    at kotlinx.coroutines.flow.SharedFlowImpl$collect$1.invokeSuspend(SharedFlow.kt) 
                                                                                                    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 
                                                                                                    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) 
                                                                                                    at android.os.Handler.handleCallback(Handler.java:751) 
                                                                                                    at android.os.Handler.dispatchMessage(Handler.java:95) 
                                                                                                    at android.os.Looper.loop(Looper.java:154) 
                                                                                                    at android.app.ActivityThread.main(ActivityThread.java:6200) 
                                                                                                    at java.lang.reflect.Method.invoke(Native Method) 
                                                                                                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:911) 
                                                                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:801) 
                                                                                                Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/adobe/adobepass/accessenabler/api/IAccessEnablerDelegate;
                                                                                                    at com.viewlift.DaggerAppCMSApplication_HiltComponents_SingletonC$SingletonCImpl$SwitchingProvider.get(DaggerAppCMSApplication_HiltComponents_SingletonC.java:1758) 
                                                                                                    at dagger.internal.DoubleCheck.get(DoubleCheck.java:47) 
                                                                                                    at com.viewlift.adobepass.presentation.viewmodel.TVEProviderViewModel.setAdobePassListener(TVEProviderViewModel.kt:205) 
                                                                                                    at com.viewlift.adobepass.presentation.viewmodel.TVEProviderViewModel.getAuthentication(TVEProviderViewModel.kt:252) 
                                                                                                    at com.viewlift.adobepass.presentation.viewmodel.TVEProviderViewModel.mapIntents(TVEProviderViewModel.kt:84) 
                                                                                                    at com.viewlift.adobepass.presentation.viewmodel.TVEProviderViewModel.mapIntents(TVEProviderViewModel.kt:45) 
                                                                                                    at com.viewlift.core.base.BaseViewModel$1$1.invokeSuspend(BaseViewModel.kt:47) 
                                                                                                    at com.viewlift.core.base.BaseViewModel$1$1.invoke(BaseViewModel.kt) 
                                                                                                    at com.viewlift.core.base.BaseViewModel$1$1.invoke(BaseViewModel.kt) 
                                                                                                    at kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapConcat$$inlined$map$1$2.emit(Emitters.kt:223) 
                                                                                                    at kotlinx.coroutines.flow.SharedFlowImpl.collect$suspendImpl(SharedFlow.kt:382) 
                                                                                                    at kotlinx.coroutines.flow.SharedFlowImpl$collect$1.invokeSuspend(SharedFlow.kt) 
                                                                                                    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 
                                                                                                    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) 
                                                                                                    at android.os.Handler.handleCallback(Handler.java:751) 
                                                                                                    at android.os.Handler.dispatchMessage(Handler.java:95) 
                                                                                                    at android.os.Looper.loop(Looper.java:154) 
                                                                                                    at android.app.ActivityThread.main(ActivityThread.java:6200) 
                                                                                                    at java.lang.reflect.Method.invoke(Native Method) 
                                                                                                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:911) 
                                                                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:801) 
                                                                                                Caused by: java.lang.ClassNotFoundException: Didn't find class "com.adobe.adobepass.accessenabler.api.IAccessEnablerDelegate" on path: DexPathList[[zip file "/system/priv-app/DeviceMessagingAndroidSDK/DeviceMessagingAndroidSDK.apk", zip file "/system/priv-app/MetricsApi/MetricsApi.apk", zip file "/data/app/com.mse.monumentalsnetwork-1/base.apk"],nativeLibraryDirectories=[/data/app/com.mse.monumentalsnetwork-1/lib/arm, /data/app/com.mse.monumentalsnetwork-1/base.apk!/lib/armeabi-v7a, /system/priv-app/DeviceMessagingAndroidSDK/DeviceMessagingAndroidSDK.apk!/lib/armeabi-v7a, /system/priv-app/DeviceMessagingAndroidSDK/lib/arm, /system/priv-app/DeviceMessagingAndroidSDK/DeviceMessagingAndroidSDK.apk!/lib/armeabi, /system/priv-app/MetricsApi/MetricsApi.apk!/lib/armeabi-v7a, /system/priv-app/MetricsApi/lib/arm, /system/priv-app/MetricsApi/MetricsApi.apk!/lib/armeabi, /system/lib, /vendor/lib]]
                                                                                                    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)

无法弄清楚是什么原因造成的。

android singleton dagger dagger-hilt
© www.soinside.com 2019 - 2024. All rights reserved.