方法不在android studio中执行

时间:2016-06-15 08:56:08

标签: android

06-15 14:51:25.685 22821-22821/com.example.sajols.basketballscore E/AndroidRuntime: FATAL EXCEPTION: main
                                                                                    java.lang.IllegalStateException: Could not execute method for android:onClick
                                                                                        at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:293)
                                                                                        at android.view.View.performClick(View.java:4475)
                                                                                        at android.view.View$PerformClick.run(View.java:18786)
                                                                                        at android.os.Handler.handleCallback(Handler.java:730)
                                                                                        at android.os.Handler.dispatchMessage(Handler.java:92)
                                                                                        at android.os.Looper.loop(Looper.java:176)
                                                                                        at android.app.ActivityThread.main(ActivityThread.java:5419)
                                                                                        at java.lang.reflect.Method.invokeNative(Native Method)
                                                                                        at java.lang.reflect.Method.invoke(Method.java:525)
                                                                                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
                                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
                                                                                        at dalvik.system.NativeStart.main(Native Method)
                                                                                     Caused by: java.lang.reflect.InvocationTargetException
                                                                                        at java.lang.reflect.Method.invokeNative(Native Method)
                                                                                        at java.lang.reflect.Method.invoke(Method.java:525)
                                                                                        at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:288)
                                                                                        at android.view.View.performClick(View.java:4475) 
                                                                                        at android.view.View$PerformClick.run(View.java:18786) 
                                                                                        at android.os.Handler.handleCallback(Handler.java:730) 
                                                                                        at android.os.Handler.dispatchMessage(Handler.java:92) 
                                                                                        at android.os.Looper.loop(Looper.java:176) 
                                                                                        at android.app.ActivityThread.main(ActivityThread.java:5419) 
                                                                                        at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                                        at java.lang.reflect.Method.invoke(Method.java:525) 
                                                                                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046) 
                                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862) 
                                                                                        at dalvik.system.NativeStart.main(Native Method) 
                                                                                     Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x2
                                                                                        at android.content.res.Resources.getText(Resources.java:1068)
                                                                                        at android.support.v7.widget.ResourcesWrapper.getText(ResourcesWrapper.java:52)
                                                                                        at android.widget.TextView.setText(TextView.java:4546)
                                                                                        at com.example.sajols.basketballscore.MainActivity.displayScoreTeamB(MainActivity.java:73)
                                                                                        at com.example.sajols.basketballscore.MainActivity.twoPointsTeamB(MainActivity.java:62)
                                                                                        at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                                        at java.lang.reflect.Method.invoke(Method.java:525) 
                                                                                        at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:288) 
                                                                                        at android.view.View.performClick(View.java:4475) 
                                                                                        at android.view.View$PerformClick.run(View.java:18786) 
                                                                                        at android.os.Handler.handleCallback(Handler.java:730) 
                                                                                        at android.os.Handler.dispatchMessage(Handler.java:92) 
                                                                                        at android.os.Looper.loop(Looper.java:176) 
                                                                                        at android.app.ActivityThread.main(ActivityThread.java:5419) 
                                                                                        at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                                        at java.lang.reflect.Method.invoke(Method.java:525) 
                                                                                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046) 
                                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862) 
                                                                                        at dalvik.system.NativeStart.main(Native Method) 

0 个答案:

没有答案