12-01 00:36:28.058: E/AndroidRuntime(5062): Caused by: java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.EditText
If there is a cleanup issue then it can throw any casting error.I got this:
Caused by: java.lang.ClassCastException: android.widget.EditText cannot be cast to android.widget.LinearLayout
In eclipse, Just go to Project > Clean & Select your project to clean it.
<TextView android:id="@+id/t" ... />
<TextView android:id="@+id/des" ... />
EditText t=(EditText) findViewById(R.id.t);
EditText d=(EditText) findViewById(R.id.des);
Do you want TextViews or EditTexts?
Either change the XML to use EditTexts or the Java to use TextViews...
Delete R.java Clean project Save files Build & Run
You use textview in xml, but in the activity you try to EditText t=(EditText) findViewById(R.id.t) - not correct; use TextView t=(TextView) findViewById(R.id.t);
or change in xml TextView to EditText
I could solve it by just cleaning the project with project/clean.