Saturday, August 20, 2011

[android-developers] java.lang.ClassCastException: android.widget.EditText

I removed EditText from my layout and after that i started getting
"Force close" error. My app is not starting at all. Here is the trace
i captured with logcat;

=====================================================
E/AndroidRuntime( 1335): FATAL EXCEPTION: main
E/AndroidRuntime( 1335): java.lang.RuntimeException: Unable to start
activity Co
mponentInfo{com.myApp/com.myApp.DashBoard}:
java.lang.ClassCastException: android.widget.EditText
E/AndroidRuntime( 1335): at
android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2781)
E/AndroidRuntime( 1335): at
android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2797)
E/AndroidRuntime( 1335): at android.app.ActivityThread.access
$2300(Activi
tyThread.java:135)
E/AndroidRuntime( 1335): at android.app.ActivityThread
$H.handleMessage(Ac
tivityThread.java:2132)
E/AndroidRuntime( 1335): at
android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime( 1335): at android.os.Looper.loop(Looper.java:
143)
E/AndroidRuntime( 1335): at
android.app.ActivityThread.main(ActivityThrea
d.java:4914)
E/AndroidRuntime( 1335): at
java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 1335): at
java.lang.reflect.Method.invoke(Method.java:5
21)
E/AndroidRuntime( 1335): at com.android.internal.os.ZygoteInit
$MethodAndA
rgsCaller.run(ZygoteInit.java:858)
E/AndroidRuntime( 1335): at
com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:616)
E/AndroidRuntime( 1335): at
dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 1335): Caused by: java.lang.ClassCastException:
android.widget
.EditText
E/AndroidRuntime( 1335): at
com.myApp.DashBoard.onCreate(DashBoard.java
:70)
E/AndroidRuntime( 1335): at
android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1065)
E/AndroidRuntime( 1335): at
android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2745)
============================================

I am not using the removed EditText in the code even then it is
throwing this error...

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate