android-fragments java.lang.NoSuchFieldError:类中没有类型I的字段$stable

vfhzx4xs  于 2022-11-13  发布在  Android
关注(0)|答案(2)|浏览(116)

当我尝试导航到使用“材质运动”的片段时,出现以下错误。

使用的版本:

  • Kotlin1.5.10
  • 撰写Beta 09
  • 材料1.4.0-rc 01
  • 片段1.3.5
  • AGP 7.0.0-beta 03(必须等待Dagger修复)
  • 陪同人员0.11.1
java.lang.NoSuchFieldError: No field $stable of type I in class Landroidx/compose/animation/core/Transition; or its superclasses (declaration of 'androidx.compose.animation.core.Transition' appears in /data/app/~~NMhx8f3SifgkfcXt9VHSKg==/app.tempory.debug-ZA5ilk8Gd0enqUNaUHOpCg==/base.apk)
        at com.google.accompanist.imageloading.MaterialLoadingImage.updateFadeInTransition(MaterialLoadingImage.kt:53)
        at com.google.accompanist.imageloading.LoadPainterKt.animateFadeInColorFilter(LoadPainter.kt:382)
        at com.google.accompanist.imageloading.LoadPainterKt.access$animateFadeInColorFilter(LoadPainter.kt:1)
        at com.google.accompanist.imageloading.LoadPainterKt$animateFadeInColorFilter$3.invoke(Unknown Source:10)
        at com.google.accompanist.imageloading.LoadPainterKt$animateFadeInColorFilter$3.invoke(Unknown Source:10)
        at androidx.compose.runtime.RecomposeScopeImpl.compose(RecomposeScopeImpl.kt:140)
        at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2156)
        at androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:2399)
        at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:2578)
        at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:2571)
        at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(SnapshotState.kt:523)
        at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:2564)
        at androidx.compose.runtime.ComposerImpl.recompose$runtime_release(Composer.kt:2540)
        at androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:613)
        at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:764)
        at androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt:103)
        at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:447)
        at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:416)
        at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:34)
        at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:109)
        at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41)
        at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:970)
        at android.view.Choreographer.doCallbacks(Choreographer.java:796)
        at android.view.Choreographer.doFrame(Choreographer.java:727)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7664)
        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)
soat7uwm

soat7uwm1#

在这种情况下,我忘记将随行人员更新到正确的版本(0.12.0)。

kx5bkwkv

kx5bkwkv2#

这不是OP的问题,但对于像我这样在搜索过程中遇到的人来说,如果您在compose中将类编辑为@Immutable,则可能会出现类似的错误消息。这是一个编译器缓存错误,只需从Android Studio菜单执行Build -> Rebuild即可修复它。

相关问题