Giter Club home page Giter Club logo

Comments (6)

junixapp avatar junixapp commented on May 28, 2024

@qiushui95 可以说下您的机型和系统,崩溃的话截个崩溃日志的图;您直接这样说,我很难定位问题所在。

from xpopup.

qiushui95 avatar qiushui95 commented on May 28, 2024

应该和机型无关
2018-12-24 17:00:19.845 28719-28719/com.lxj.xpopupdemo E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.lxj.xpopupdemo, PID: 28719
java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference
at com.lxj.xpopupdemo.fragment.QuickStartDemo.init(QuickStartDemo.java:28)
at com.lxj.xpopupdemo.MainActivity.callFragmentInit(MainActivity.java:74)
at com.lxj.xpopupdemo.MainActivity.access$000(MainActivity.java:21)
at com.lxj.xpopupdemo.MainActivity$2.run(MainActivity.java:64)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6942)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

from xpopup.

qiushui95 avatar qiushui95 commented on May 28, 2024

将您的BaseFragment内的init放到onViewCreated内执行就可以了。
旋转屏幕过后fragment.getView()获取到的是null

from xpopup.

junixapp avatar junixapp commented on May 28, 2024

@qiushui95 恩,多谢您提供的Issue。最新的Demo已修复这个Bug,可以下载看看。

from xpopup.

qiushui95 avatar qiushui95 commented on May 28, 2024

你这个修复太牛逼了。。。。。。我尽无言以对

from xpopup.

junixapp avatar junixapp commented on May 28, 2024

@qiushui95 就问你6不6

from xpopup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.