gpt4 book ai didi

android - IllegalStateException 无法在分离 View 上启动此动画器

转载 作者:行者123 更新时间:2023-11-29 02:35:30 25 4
gpt4 key购买 nike

我正在尝试解决 Crashlytics 为 Android 应用程序报告的崩溃问题。根据 Crashlytics 的说法,崩溃仅发生在 Android OS 8.1 上,不会发生在任何其他操作系统版本上。

问题是 Crashlytics 的堆栈跟踪没有给我任何关于崩溃发生的位置/方式的线索,因为它只显示了 Android SDK 调用堆栈。这是堆栈跟踪:

Fatal Exception: java.lang.IllegalStateException: Cannot start this animator on a detached view!
at android.view.RenderNode.addAnimator(RenderNode.java:799)
at android.view.RenderNodeAnimator.setTarget(RenderNodeAnimator.java:299)
at android.view.RenderNodeAnimator.setTarget(RenderNodeAnimator.java:289)
at android.graphics.drawable.RippleComponent$RenderNodeAnimatorSet.start(RippleComponent.java:316)
at android.graphics.drawable.RippleComponent.startPendingAnimation(RippleComponent.java:200)
at android.graphics.drawable.RippleComponent.draw(RippleComponent.java:167)
at android.graphics.drawable.RippleDrawable.drawBackgroundAndRipples(RippleDrawable.java:892)
at android.graphics.drawable.RippleDrawable.draw(RippleDrawable.java:699)
at android.view.View.onDrawForeground(View.java:20914)
at android.view.View.draw(View.java:19205)
at android.transition.TransitionUtils.createViewBitmap(TransitionUtils.java:177)
at android.app.SharedElementCallback.onCaptureSharedElementSnapshot(SharedElementCallback.java:205)
at android.app.ActivityTransitionCoordinator.captureSharedElementState(ActivityTransitionCoordinator.java:810)
at android.app.ActivityTransitionCoordinator.captureSharedElementState(ActivityTransitionCoordinator.java:733)
at android.app.ExitTransitionCoordinator.sharedElementTransitionComplete(ExitTransitionCoordinator.java:405)
at android.app.ExitTransitionCoordinator$9.onTransitionEnd(ExitTransitionCoordinator.java:362)
at android.transition.Transition.end(Transition.java:1926)
at android.transition.TransitionSet$TransitionSetListener.onTransitionEnd(TransitionSet.java:369)
at android.transition.Transition.end(Transition.java:1926)
at android.transition.TransitionSet$TransitionSetListener.onTransitionEnd(TransitionSet.java:369)
at android.transition.Transition.end(Transition.java:1926)
at android.transition.TransitionSet$TransitionSetListener.onTransitionEnd(TransitionSet.java:369)
at android.transition.Transition.end(Transition.java:1926)
at android.transition.Transition.runAnimators(Transition.java:883)
at android.transition.TransitionSet.runAnimators(TransitionSet.java:433)
at android.transition.TransitionSet.runAnimators(TransitionSet.java:433)
at android.transition.TransitionSet.runAnimators(TransitionSet.java:433)
at android.transition.TransitionSet.runAnimators(TransitionSet.java:433)
at android.transition.Transition.playTransition(Transition.java:1780)
at android.transition.TransitionManager$MultiListener.onPreDraw(TransitionManager.java:315)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:977)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2349)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1392)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6752)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
at android.view.Choreographer.doCallbacks(Choreographer.java:723)
at android.view.Choreographer.doFrame(Choreographer.java:658)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

我在 Stackoverflow 和其他网站上搜索了“无法在分离 View 上启动此动画师”,但所有网站都涉及调用自己的自定义类。但是,就我而言,Android SDK 本身似乎崩溃了!

有没有人有过类似的经历?堆栈跟踪能说明什么吗?我应该从哪里开始研究这个问题? Activity 过渡?动画代码?

非常感谢任何帮助!

最佳答案

我知道已经晚了,但对于其他面临这个问题的人来说,我也有这个问题。我正在使用 MaterialShowcaseView问题是当用户打开一个 Activity 并且想要出现一个 showCase 时,如果用户立即关闭当前 Activity ,该 Activity 将分离所有布局小部件。所以显示动画无法启动,因为 View 不再存在!这是 open issue in github .

关于android - IllegalStateException 无法在分离 View 上启动此动画器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47336690/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com