question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.NullPointerException: Attempt to invoke virtual method 'int me.yokeyword.fragmentation.anim.FragmentAnimator.getEnter()' on a null object reference

See original GitHub issue

#问题出现概率:必现

复现方法

APP启动后,到系统权限设置界面去关闭APP的某个权限,会导致APP进程退出,重新打开APP,就会崩溃

#手机系统:6.0以上

  • Lib 1.3.3
  • Support Lib 27.1.0
  • Log

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int me.yokeyword.fragmentation.anim.FragmentAnimator.getEnter()' on a null object reference at me.yokeyword.fragmentation.helper.internal.AnimatorHelper.initEnterAnim(AnimatorHelper.java:63) at me.yokeyword.fragmentation.helper.internal.AnimatorHelper.notifyChanged(AnimatorHelper.java:29) at me.yokeyword.fragmentation.helper.internal.AnimatorHelper.<init>(AnimatorHelper.java:24) at me.yokeyword.fragmentation.SupportFragmentDelegate.onCreate(SupportFragmentDelegate.java:117)

  • Screenshots

In addition, we do not accept issues unrelated to Fragmentation.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
foolchencommented, Apr 10, 2018

@z1060932884 v4包更新到27.1.1试试。 开发者模式中,把“不保留活动”打开应该就能复现了,应该是应用在后台被杀死,切换到前台重建时出了问题。

3reactions
nicai1900commented, Apr 9, 2018

@YoKeyword 问题解决了,我自己的错

自己实现了ISupportFragment 接口,漏了复写下面的接口了,因此导致没有保存mFragmentAnimator的数据。


    override fun onSaveInstanceState(outState: Bundle) {
        super.onSaveInstanceState(outState)
        delegate.onSaveInstanceState(outState)
    }
Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.NullPointerException:Attempt to invoke ... - GitHub
java.lang.NullPointerException:Attempt to invoke virtual method 'int me.yokeyword.fragmentation.anim.FragmentAnimator.getEnter()' on a null object reference.
Read more >
Attempt to invoke virtual method 'int android.view.View ...
it sometimes occurs when we use a custom adapter in any activity of fragment . and we return null object i.e null view...
Read more >
fatal exception: java.lang.nullpointerexception: attempt to ...
Facing a problem with a practice app I'm working on. I'm facing a NullPointerException problem relating to the toString method.
Read more >
java.lang.NullPointerException: Attempt to invoke virtual method
View$OnClickListener)' on a null object reference. Caused by: java.lang.NullPointerException: Attempt to invoke virtual method ' void ...
Read more >
Attempt to invoke virtual method 'void com.android.server.wm ...
Intermittent java.lang.NullPointerException: Attempt to invoke virtual method 'void ... TaskStack, boolean)' on a null object reference.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found