IllegalStateException无法在分离视图上启动此动画制作者

时间:2017-11-16 18:24:57

标签: android animation

我正在尝试解决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以及其他网站关于“无法在独立视图上启动此动画制作者”,但所有这些都涉及他们自己调用的自定义类。但是,就我而言,似乎Android SDK本身崩溃了!

以前有人有类似的经历吗?堆栈跟踪是否可以说明任何内容?我应该在哪里开始研究这个问题?活动过渡?动画代码?

非常感谢任何帮助!

1 个答案:

答案 0 :(得分:0)

我知道已经晚了,但是对于其他面临此问题的人,我也有此问题。 我正在使用MaterialShowcaseView,问题是当用户打开一个活动而要显示一个showCase时,如果用户立即关闭当前活动,则该活动将分离所有布局小部件。因此,显示动画无法开始,因为视图不再存在!这是open issue in github