Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7836905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:22:45+00:00 2026-06-02T14:22:45+00:00

Im designing my first android application and keep coming up with the following error

  • 0

Im designing my first android application and keep coming up with the following error which is draining the life out of me and I do not understand it very well (Please find my Logcat (verbose), Java Code(this i played around with and this began to occur once started to work on my editButton and buttonUpdate bit. Does it have anything to do with the editStatus? I really think it may) and I have also put in my manifest file:

LOGCAT verbose

04-21 15:30:23.388: D/AndroidRuntime(276): Shutting down VM
04-21 15:30:23.388: W/dalvikvm(276): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
04-21 15:30:23.427: E/AndroidRuntime(276): FATAL EXCEPTION: main
04-21 15:30:23.427: E/AndroidRuntime(276): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.locator.demo/com.locator.demo.LocatorDemoActivity}: java.lang.ClassCastException: android.widget.TextView
04-21 15:30:23.427: E/AndroidRuntime(276):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
04-21 15:30:23.427: E/AndroidRuntime(276):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
04-21 15:30:23.427: E/AndroidRuntime(276):  at android.app.ActivityThread.access$2300(ActivityThread.java:125)
04-21 15:30:23.427: E/AndroidRuntime(276):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
04-21 15:30:23.427: E/AndroidRuntime(276):  at android.os.Handler.dispatchMessage(Handler.java:99)
04-21 15:30:23.427: E/AndroidRuntime(276):  at android.os.Looper.loop(Looper.java:123)
04-21 15:30:23.427: E/AndroidRuntime(276):  at android.app.ActivityThread.main(ActivityThread.java:4627)
04-21 15:30:23.427: E/AndroidRuntime(276):  at java.lang.reflect.Method.invokeNative(Native Method)
04-21 15:30:23.427: E/AndroidRuntime(276):  at java.lang.reflect.Method.invoke(Method.java:521)
04-21 15:30:23.427: E/AndroidRuntime(276):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
04-21 15:30:23.427: E/AndroidRuntime(276):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
04-21 15:30:23.427: E/AndroidRuntime(276):  at dalvik.system.NativeStart.main(Native Method)
04-21 15:30:23.427: E/AndroidRuntime(276): Caused by: java.lang.ClassCastException: android.widget.TextView
04-21 15:30:23.427: E/AndroidRuntime(276):  at com.locator.demo.LocatorDemoActivity.onCreate(LocatorDemoActivity.java:21)
04-21 15:30:23.427: E/AndroidRuntime(276):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-21 15:30:23.427: E/AndroidRuntime(276):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
04-21 15:30:23.427: E/AndroidRuntime(276):  ... 11 more
04-21 15:35:23.607: I/Process(276): Sending signal. PID: 276 SIG: 9
04-21 15:50:32.127: D/AndroidRuntime(301): Shutting down VM
04-21 15:50:32.127: W/dalvikvm(301): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
04-21 15:50:32.147: E/AndroidRuntime(301): FATAL EXCEPTION: main
04-21 15:50:32.147: E/AndroidRuntime(301): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.locator.demo/com.locator.demo.LocatorDemoActivity}: java.lang.ClassCastException: android.widget.TextView
04-21 15:50:32.147: E/AndroidRuntime(301):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
04-21 15:50:32.147: E/AndroidRuntime(301):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
04-21 15:50:32.147: E/AndroidRuntime(301):  at android.app.ActivityThread.access$2300(ActivityThread.java:125)
04-21 15:50:32.147: E/AndroidRuntime(301):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
04-21 15:50:32.147: E/AndroidRuntime(301):  at android.os.Handler.dispatchMessage(Handler.java:99)
04-21 15:50:32.147: E/AndroidRuntime(301):  at android.os.Looper.loop(Looper.java:123)
04-21 15:50:32.147: E/AndroidRuntime(301):  at android.app.ActivityThread.main(ActivityThread.java:4627)
04-21 15:50:32.147: E/AndroidRuntime(301):  at java.lang.reflect.Method.invokeNative(Native Method)
04-21 15:50:32.147: E/AndroidRuntime(301):  at java.lang.reflect.Method.invoke(Method.java:521)
04-21 15:50:32.147: E/AndroidRuntime(301):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
04-21 15:50:32.147: E/AndroidRuntime(301):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
04-21 15:50:32.147: E/AndroidRuntime(301):  at dalvik.system.NativeStart.main(Native Method)
04-21 15:50:32.147: E/AndroidRuntime(301): Caused by: java.lang.ClassCastException: android.widget.TextView
04-21 15:50:32.147: E/AndroidRuntime(301):  at com.locator.demo.LocatorDemoActivity.onCreate(LocatorDemoActivity.java:21)
04-21 15:50:32.147: E/AndroidRuntime(301):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-21 15:50:32.147: E/AndroidRuntime(301):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
04-21 15:50:32.147: E/AndroidRuntime(301):  ... 11 more

CODE:

package com.locator.demo;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;


public class LocatorDemoActivity extends Activity implements OnClickListener {
    EditText editStatus;
    Button buttonUpdate;

     /** Called when the activity is first created. */
     @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.locationstatus); 

        editStatus = (EditText)findViewById(R.id.edit_status);
        buttonUpdate = (Button)findViewById(R.id.button_update);
        buttonUpdate.setOnClickListener(this);

                //have button 'listen' for click

    }

    public void onClick(View arg0) {
        // TODO Auto-generated method stub

    }

}

ANDROID Manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.locator.demo"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="8" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_main" >
        <activity
            android:name=".LocatorDemoActivity"
            android:label="@string/app_main" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

I have;

attempted to do adb kill-server and adb start-server and run it with an without an emulator as suggested in another post. Please be slightly understanding as my knowledge of eclipse and Java is pretty low and im learning.

Please help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T14:22:48+00:00Added an answer on June 2, 2026 at 2:22 pm

    As seen from this error:

    java.lang.RuntimeException: Unable to start activity
    ComponentInfo{com.locator.demo/com.locator.demo.LocatorDemoActivity}:
    java.lang.ClassCastException: android.widget.TextView

    And this one:

    Caused by: java.lang.ClassCastException: android.widget.TextView

    You are trying to cast a TextView to EditText ( in this line: editStatus = (EditText)findViewById(R.id.edit_status);).

    Go to locationstatus.xml, and change the TextView with the id edit_status to EditText.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am designing a web application using GWT currently, which is also the first
I'm designing a database application which stores simple contact information (First/Last Name etc.) and
I'm designing an Android app which loads lots of small (say 128x128px@24-bit) PNG images
I'm designing a console application for the first time in my career. This console
I am new comer to android but not to java. I have been designing
I'm in the process of building and designing my first Javascript OOP web application
A little background first: I'm designing a web application for a control system that
I am currently working on designing my first FPS game using JOGL. (Java bindings
First of all, I want to be clear that I'm not talking about defining
I have several ListActivties set up in my Android Application. What I am trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.