App crashes.

27 views
Skip to first unread message

Jhanarthananraja Nagaraja

unread,
May 6, 2018, 10:02:17 AM5/6/18
to Firebase Google Group
Hi.. I'm trying to create an app using Android Studio..
My app crashes during registration using email and password..

This is my crash report

----------------------------------------------------------------

    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.chatapp.kingchat.kingchat/com.chatapp.kingchat.kingchat.RegisterActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2450)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)
        at android.app.ActivityThread.-wrap11(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:148)
        at android.app.ActivityThread.main(ActivityThread.java:5461)
        at android.app.ActivityThreadHook.handleMain(ActivityThreadHook.java:27)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
        at com.chatapp.kingchat.kingchat.RegisterActivity.onCreate(RegisterActivity.java:39)
        at android.app.Activity.performCreate(Activity.java:6251)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2403)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510) 
        at android.app.ActivityThread.-wrap11(ActivityThread.java) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:148) 
        at android.app.ActivityThread.main(ActivityThread.java:5461) 
        at android.app.ActivityThreadHook.handleMain(ActivityThreadHook.java:27) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 

-----------------------------------------------------

Kato Richardson

unread,
May 7, 2018, 2:59:08 PM5/7/18
to Firebase Google Group
Hello Jhanarthananraja,

So great to meet you. At first glance, this looks like a UI problem. Like perhaps you didn't specify the correct button id in your click listener?

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/676473c8-5d03-4af9-a701-ddfc38260c7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Reply all
Reply to author
Forward
0 new messages