Help me : loginButton = (Button)findViewById(R.id.loginButton); registerButton = (Button)findViewById(R.id.registerButton); //cb = (CheckBox)findViewById(R.id.cbRemember); //registerButton.setOnClickListener(this); //loginButton.setOnClickListener(this);
View v=findViewById(R.id.userID); uid=(EditText)v; // note: problem line i //uid = (EditText)findViewById(R.id.userID); //pwd = (EditText)findViewById(R.id.passWord); 09-28 08:21:01.750: ERROR/AndroidRuntime(791): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.zhuhaiyuanli/com.zhuhaiyuanli.Login}: java.lang.ClassCastException: android.widget.CheckBox 09-28 08:21:01.750: ERROR/AndroidRuntime(791): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2663) 09-28 08:21:01.750: ERROR/AndroidRuntime(791): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2679) 09-28 08:21:01.750: ERROR/AndroidRuntime(791): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 09-28 08:21:01.750: ERROR/AndroidRuntime(791): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 09-28 08:21:01.750: ERROR/AndroidRuntime(791): at android.os.Handler.dispatchMessage(Handler.java:99) 09-28 08:21:01.750: ERROR/AndroidRuntime(791): at android.os.Looper.loop(Looper.java:123) 09-28 08:21:01.750: ERROR/AndroidRuntime(791): at android.app.ActivityThread.main(ActivityThread.java:4627) 09-28 08:21:01.750: ERROR/AndroidRuntime(791): at java.lang.reflect.Method.invokeNative(Native Method) 09-28 08:21:01.750: ERROR/AndroidRuntime(791): at java.lang.reflect.Method.invoke(Method.java:521) 09-28 08:21:01.750: ERROR/AndroidRuntime(791): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:868) 09-28 08:21:01.750: ERROR/AndroidRuntime(791): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 09-28 08:21:01.750: ERROR/AndroidRuntime(791): at dalvik.system.NativeStart.main(Native Method) 09-28 08:21:01.750: ERROR/AndroidRuntime(791): Caused by: java.lang.ClassCastException: android.widget.CheckBox 09-28 08:21:01.750: ERROR/AndroidRuntime(791): at com.zhuhaiyuanli.Login.onCreate(Login.java:66) 09-28 08:21:01.750: ERROR/AndroidRuntime(791): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1047) 09-28 08:21:01.750: ERROR/AndroidRuntime(791): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2627) 09-28 08:21:01.750: ERROR/AndroidRuntime(791): ... 11 more -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en