Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
66 views
in Technique[技术] by (71.8m points)

android - How can I solve the problem with the OnClick?

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: andoid.example.taxiluks, PID: 5627
    java.lang.IllegalStateException: Could not execute method for android:onClick
        at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:414)
        at android.view.View.performClick(View.java:6320)
        at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:992)
        at android.view.View$PerformClick.run(View.java:25087)
        at android.os.Handler.handleCallback(Handler.java:869)
        at android.os.Handler.dispatchMessage(Handler.java:101)
        at android.os.Looper.loop(Looper.java:206)
        at android.app.ActivityThread.main(ActivityThread.java:6749)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:845)
     Caused by: java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Method.invoke(Native Method)
        at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:409)
        at android.view.View.performClick(View.java:6320)?
        at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:992)?
        at android.view.View$PerformClick.run(View.java:25087)?
        at android.os.Handler.handleCallback(Handler.java:869)?
        at android.os.Handler.dispatchMessage(Handler.java:101)?
        at android.os.Looper.loop(Looper.java:206)?
        at android.app.ActivityThread.main(ActivityThread.java:6749)?
        at java.lang.reflect.Method.invoke(Native Method)?
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)?
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:845)?
     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.widget.EditText com.google.android.material.textfield.TextInputLayout.getEditText()' on a null object reference
        at andoid.example.taxiluks.PassengerSingInActivity.validateEmail(PassengerSingInActivity.java:73)
        at andoid.example.taxiluks.PassengerSingInActivity.passengerCreateLogIn(PassengerSingInActivity.java:130)
        at java.lang.reflect.Method.invoke(Native Method)?
        at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:409)?
        at android.view.View.performClick(View.java:6320)?
        at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:992)?
        at android.view.View$PerformClick.run(View.java:25087)?
        at android.os.Handler.handleCallback(Handler.java:869)?
        at android.os.Handler.dispatchMessage(Handler.java:101)?
        at android.os.Looper.loop(Looper.java:206)?
        at android.app.ActivityThread.main(ActivityThread.java:6749)?
        at java.lang.reflect.Method.invoke(Native Method)?
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)?
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:845)?
question from:https://stackoverflow.com/questions/65652326/how-can-i-solve-the-problem-with-the-onclick

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...