java.lang.NoSuchMethodError: No virtual method setTagIfAbsent(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object; in class Landroidx/lifecycle/ViewModel; or its super classes (declaration of 'androidx.lifecycle.ViewModel' appears in /data/app/~~0D3zDOgCAlrM3kfTdg3qpw==/com.app.gw.debug-Cy-fyEVYzI7k-6MlWUnl5g==/base.apk!classes24.dex)
at androidx.lifecycle.ScopeKt.scopeNetLife(Scope.kt:54)
at androidx.lifecycle.ScopeKt.scopeNetLife$default(Scope.kt:49)
at com.app.gw.feature.main.pages.discovery.DiscoveryViewModel.fetchUserInfo(DiscoveryViewModel.kt:30)
at com.app.gw.feature.main.pages.discovery.DiscoveryViewModel.getIndexData(DiscoveryViewModel.kt:77)
at com.app.gw.feature.main.pages.discovery.DiscoveryViewModel.(DiscoveryViewModel.kt:42)
at com.app.gw.DaggerGWApplication_HiltComponents_SingletonC$ViewModelCImpl$SwitchingProvider.get(DaggerGWApplication_HiltComponents_SingletonC.java:550)
at dagger.hilt.android.internal.lifecycle.HiltViewModelFactory$2.createViewModel(HiltViewModelFactory.java:133)
at dagger.hilt.android.internal.lifecycle.HiltViewModelFactory$2.create(HiltViewModelFactory.java:104)
at dagger.hilt.android.internal.lifecycle.HiltViewModelFactory.create(HiltViewModelFactory.java:171)
at androidx.lifecycle.ViewModelProvider$Factory.create(ViewModelProvider.android.kt:158)
at androidx.lifecycle.viewmodel.ViewModelProviderImpl_androidKt.createViewModel(ViewModelProviderImpl.android.kt:34)
at androidx.lifecycle.viewmodel.ViewModelProviderImpl.getViewModel$lifecycle_viewmodel_release(ViewModelProviderImpl.kt:65)
at androidx.lifecycle.viewmodel.ViewModelProviderImpl.getViewModel$lifecycle_viewmodel_release$default(ViewModelProviderImpl.kt:47)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.android.kt:91)
at androidx.lifecycle.viewmodel.compose.ViewModelKtViewModelKt.get(ViewModel.kt:162)
at androidx.lifecycle.viewmodel.compose.ViewModelKt.get(Unknown Source:1)
at androidx.lifecycle.viewmodel.compose.ViewModelKtViewModel_androidKt.viewModel(ViewModel.android.kt:124)
at androidx.lifecycle.viewmodel.compose.ViewModelKt.viewModel(Unknown Source:1)
at com.app.gw.feature.main.pages.discovery.DiscoveryRouterKt.DiscoveryRouter(DiscoveryRouter.kt:547)
at com.app.gw.feature.main.MainRouterKt$MainScreen$4$1.invoke(MainRouter.kt:85)
at com.app.gw.feature.main.MainRouterKt$MainScreen$4$1.invoke(MainRouter.kt:82)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:139)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.foundation.pager.PagerLazyLayoutItemProvider$Item$1.invoke(LazyLayoutPager.kt:199)
at androidx.compose.foundation.pager.PagerLazyLayoutItemProvider$Item$1.invoke(LazyLayoutPager.kt:197)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:248)
at androidx.compose.foundation.lazy.layout.LazyLayoutPinnableItemKt.LazyLayoutPinnableItem(LazyLayoutPinnableItem.kt:58)
at androidx.compose.foundation.pager.PagerLazyLayoutItemProvider.Item(LazyLayoutPager.kt:197)
at androidx.compose.foundation.lazy.layout.LazyLayoutItemContentFactoryKt$SkippableItem$1.invoke(LazyLayoutItemContentFactory.kt:135)
at androidx.compose.foundation.lazy.layout.LazyLayoutItemContentFactoryKt$SkippableItem$1.invoke(LazyLayoutItemContentFactory.kt:134)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
问题描述
java.lang.NoSuchMethodError: No virtual method setTagIfAbsent(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object; in class Landroidx/lifecycle/ViewModel; or its super classes (declaration of 'androidx.lifecycle.ViewModel' appears in /data/app/~~0D3zDOgCAlrM3kfTdg3qpw==/com.app.gw.debug-Cy-fyEVYzI7k-6MlWUnl5g==/base.apk!classes24.dex) at androidx.lifecycle.ScopeKt.scopeNetLife(Scope.kt:54) at androidx.lifecycle.ScopeKt.scopeNetLife$default(Scope.kt:49) at com.app.gw.feature.main.pages.discovery.DiscoveryViewModel.fetchUserInfo(DiscoveryViewModel.kt:30) at com.app.gw.feature.main.pages.discovery.DiscoveryViewModel.getIndexData(DiscoveryViewModel.kt:77) at com.app.gw.feature.main.pages.discovery.DiscoveryViewModel.(DiscoveryViewModel.kt:42)
at com.app.gw.DaggerGWApplication_HiltComponents_SingletonC$ViewModelCImpl$SwitchingProvider.get(DaggerGWApplication_HiltComponents_SingletonC.java:550)
at dagger.hilt.android.internal.lifecycle.HiltViewModelFactory$2.createViewModel(HiltViewModelFactory.java:133)
at dagger.hilt.android.internal.lifecycle.HiltViewModelFactory$2.create(HiltViewModelFactory.java:104)
at dagger.hilt.android.internal.lifecycle.HiltViewModelFactory.create(HiltViewModelFactory.java:171)
at androidx.lifecycle.ViewModelProvider$Factory.create(ViewModelProvider.android.kt:158)
at androidx.lifecycle.viewmodel.ViewModelProviderImpl_androidKt.createViewModel(ViewModelProviderImpl.android.kt:34)
at androidx.lifecycle.viewmodel.ViewModelProviderImpl.getViewModel$lifecycle_viewmodel_release(ViewModelProviderImpl.kt:65)
at androidx.lifecycle.viewmodel.ViewModelProviderImpl.getViewModel$lifecycle_viewmodel_release$default(ViewModelProviderImpl.kt:47)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.android.kt:91)
at androidx.lifecycle.viewmodel.compose.ViewModelKtViewModelKt.get(ViewModel.kt:162)
at androidx.lifecycle.viewmodel.compose.ViewModelKt.get(Unknown Source:1)
at androidx.lifecycle.viewmodel.compose.ViewModelKtViewModel_androidKt.viewModel(ViewModel.android.kt:124)
at androidx.lifecycle.viewmodel.compose.ViewModelKt.viewModel(Unknown Source:1)
at com.app.gw.feature.main.pages.discovery.DiscoveryRouterKt.DiscoveryRouter(DiscoveryRouter.kt:547)
at com.app.gw.feature.main.MainRouterKt$MainScreen$4$1.invoke(MainRouter.kt:85)
at com.app.gw.feature.main.MainRouterKt$MainScreen$4$1.invoke(MainRouter.kt:82)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:139)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.foundation.pager.PagerLazyLayoutItemProvider$Item$1.invoke(LazyLayoutPager.kt:199)
at androidx.compose.foundation.pager.PagerLazyLayoutItemProvider$Item$1.invoke(LazyLayoutPager.kt:197)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:248)
at androidx.compose.foundation.lazy.layout.LazyLayoutPinnableItemKt.LazyLayoutPinnableItem(LazyLayoutPinnableItem.kt:58)
at androidx.compose.foundation.pager.PagerLazyLayoutItemProvider.Item(LazyLayoutPager.kt:197)
at androidx.compose.foundation.lazy.layout.LazyLayoutItemContentFactoryKt$SkippableItem$1.invoke(LazyLayoutItemContentFactory.kt:135)
at androidx.compose.foundation.lazy.layout.LazyLayoutItemContentFactoryKt$SkippableItem$1.invoke(LazyLayoutItemContentFactory.kt:134)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
期望行为
如何复现
截图
异常堆栈信息或者手机截图/视频(拖拽到输入框即可上传)
版本