在开发Android应该用过程中,当我点击退出的时候报出了如下异常,纯新手

在开发Android应该用过程中,当我点击退出的时候报出了如下异常,昨天一天没有找出来,实在是笨的不行了,纯新手
logcat打印信息如下


03-20 23:11:23.789: W/dalvikvm(1926): threadid=1: thread exiting with uncaught exception (group=0xb3cfab20)
03-20 23:11:23.789: E/AndroidRuntime(1926): FATAL EXCEPTION: main
03-20 23:11:23.789: E/AndroidRuntime(1926): Process: com.example.haodf, PID: 1926
03-20 23:11:23.789: E/AndroidRuntime(1926): java.lang.IllegalStateException: Could not find a method exit_settings(View) in the activity class com.example.user.UserTab for onClick handler on view class android.widget.Button with id 'button5'
03-20 23:11:23.789: E/AndroidRuntime(1926): at android.view.View$1.onClick(View.java:3810)
03-20 23:11:23.789: E/AndroidRuntime(1926): at android.view.View.performClick(View.java:4438)
03-20 23:11:23.789: E/AndroidRuntime(1926): at android.view.View$PerformClick.run(View.java:18422)
03-20 23:11:23.789: E/AndroidRuntime(1926): at android.os.Handler.handleCallback(Handler.java:733)
03-20 23:11:23.789: E/AndroidRuntime(1926): at android.os.Handler.dispatchMessage(Handler.java:95)
03-20 23:11:23.789: E/AndroidRuntime(1926): at android.os.Looper.loop(Looper.java:136)
03-20 23:11:23.789: E/AndroidRuntime(1926): at android.app.ActivityThread.main(ActivityThread.java:5017)
03-20 23:11:23.789: E/AndroidRuntime(1926): at java.lang.reflect.Method.invokeNative(Native Method)
03-20 23:11:23.789: E/AndroidRuntime(1926): at java.lang.reflect.Method.invoke(Method.java:515)
03-20 23:11:23.789: E/AndroidRuntime(1926): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
03-20 23:11:23.789: E/AndroidRuntime(1926): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
03-20 23:11:23.789: E/AndroidRuntime(1926): at dalvik.system.NativeStart.main(Native Method)
03-20 23:11:23.789: E/AndroidRuntime(1926): Caused by: java.lang.NoSuchMethodException: exit_settings [class android.view.View]
03-20 23:11:23.789: E/AndroidRuntime(1926): at java.lang.Class.getConstructorOrMethod(Class.java:472)
03-20 23:11:23.789: E/AndroidRuntime(1926): at java.lang.Class.getMethod(Class.java:857)
03-20 23:11:23.789: E/AndroidRuntime(1926): at android.view.View$1.onClick(View.java:3803)
03-20 23:11:23.789: E/AndroidRuntime(1926): ... 11 more

0

1个回答

Caused by: java.lang.NoSuchMethodException: exit_settings [class android.view.View]
找不到方法,exit_settings 响应写错了,好好检查吧

0
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!