Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

遇到一个空指针问题:findViewById(int)' on a null object reference #104

Open
xyz-fly opened this issue Mar 19, 2019 · 0 comments
Open

Comments

@xyz-fly
Copy link

xyz-fly commented Mar 19, 2019

Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.app.Activity.findViewById(int)' on a null object reference
at cn.dreamtobe.kpswitch.util.KeyboardUtil.attach(SourceFile:166)
at cn.com.app.evolution.main.message.widget.MessageEditInputPanel.onAttachedToWindow(SourceFile:120)
at android.view.View.dispatchAttachedToWindow(View.java:17381)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3319)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3326)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3326)
at android.view.ViewGroup.addViewInner(ViewGroup.java:4955)
at android.view.ViewGroup.addView(ViewGroup.java:4746)
at android.view.ViewGroup.addView(ViewGroup.java:4718)
at android.view.LayoutInflater.inflate(LayoutInflater.java:524)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(SourceFile:287)
at android.support.v7.app.AppCompatActivity.setContentView(SourceFile:139)
at cn.com.app.evolution.main.message.ChatMessageP2PActivity.onCreate(SourceFile:201)
at android.app.Activity.performCreate(Activity.java:6975)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2775)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2897)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4769)
at android.app.ActivityThread.-wrap18(Unknown Source)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1604)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:251)
at android.app.ActivityThread.main(ActivityThread.java:6563)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

其他信息:
Caused by android.view.InflateException: Binary XML file line #2: Attempt to invoke virtual method 'android.view.View android.app.Activity.findViewById(int)' on a null object reference

出现的机型:华为和sony 系统版本为8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant