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

  • Home
  • SEARCH
  • 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 6771781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:28:23+00:00 2026-05-26T15:28:23+00:00

I have got a runtime exception while developing an App. Here is my LogCat.

  • 0

I have got a runtime exception while developing an App. Here is my LogCat.

11-06 12:56:09.977: INFO/ActivityManager(59): Starting activity: Intent { cmp=balu.android/.CommonNames }
11-06 12:56:10.096: INFO/CommonNameTable(516): OPening DataBase Connection....
11-06 12:56:10.156: INFO/global(516): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
11-06 12:56:10.156: INFO/CommonNameTable(516): Inserting record...
11-06 12:56:10.306: INFO/CommonNameTable(516): Inserting record...
11-06 12:56:10.428: INFO/CommonNameTable(516): Inserting record...
11-06 12:56:10.546: INFO/CommonNameTable(516): OPening DataBase Connection....
11-06 12:56:10.576: DEBUG/AndroidRuntime(516): Shutting down VM
11-06 12:56:10.576: WARN/dalvikvm(516): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
11-06 12:56:10.596: ERROR/AndroidRuntime(516): FATAL EXCEPTION: main
11-06 12:56:10.596: ERROR/AndroidRuntime(516): java.lang.RuntimeException: Unable to start activity ComponentInfo{balu.android/balu.android.CommonNames}: java.lang.ClassCastException: android.widget.TextView
11-06 12:56:10.596: ERROR/AndroidRuntime(516):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
11-06 12:56:10.596: ERROR/AndroidRuntime(516):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
11-06 12:56:10.596: ERROR/AndroidRuntime(516):     at android.app.ActivityThread.access$2300(ActivityThread.java:125)
11-06 12:56:10.596: ERROR/AndroidRuntime(516):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
11-06 12:56:10.596: ERROR/AndroidRuntime(516):     at android.os.Handler.dispatchMessage(Handler.java:99)
11-06 12:56:10.596: ERROR/AndroidRuntime(516):     at android.os.Looper.loop(Looper.java:123)
11-06 12:56:10.596: ERROR/AndroidRuntime(516):     at android.app.ActivityThread.main(ActivityThread.java:4627)
11-06 12:56:10.596: ERROR/AndroidRuntime(516):     at java.lang.reflect.Method.invokeNative(Native Method)
11-06 12:56:10.596: ERROR/AndroidRuntime(516):     at java.lang.reflect.Method.invoke(Method.java:521)
11-06 12:56:10.596: ERROR/AndroidRuntime(516):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
11-06 12:56:10.596: ERROR/AndroidRuntime(516):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-06 12:56:10.596: ERROR/AndroidRuntime(516):     at dalvik.system.NativeStart.main(Native Method)
11-06 12:56:10.596: ERROR/AndroidRuntime(516): Caused by: java.lang.ClassCastException: android.widget.TextView
11-06 12:56:10.596: ERROR/AndroidRuntime(516):     at balu.android.CommonNames.onCreate(CommonNames.java:31)
11-06 12:56:10.596: ERROR/AndroidRuntime(516):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
11-06 12:56:10.596: ERROR/AndroidRuntime(516):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
11-06 12:56:10.596: ERROR/AndroidRuntime(516):     ... 11 more
11-06 12:56:10.616: WARN/ActivityManager(59):   Force finishing activity balu.android/.CommonNames
11-06 12:56:10.626: WARN/ActivityManager(59):   Force finishing activity balu.android/.Select
11-06 12:56:11.183: WARN/ActivityManager(59): Activity pause timeout for HistoryRecord{450af6e8 balu.android/.CommonNames}
11-06 12:56:20.036: WARN/ActivityManager(59): Launch timeout has expired, giving up wake lock!
11-06 12:56:20.125: WARN/ActivityManager(59): Activity idle timeout for HistoryRecord{450af6e8 balu.android/.CommonNames}
11-06 12:56:21.252: WARN/ActivityManager(59): Activity idle timeout for HistoryRecord{44fd7b98 balu.android/.BabyNamesAppActivity}
11-06 12:56:26.456: DEBUG/dalvikvm(132): GC_EXPLICIT freed 1211 objects / 86976 bytes in 177ms

I think this is the source of the problem.

https://github.com/Balu-Varanasi/BabyNamesApp/blob/master/src/balu/android/CommonNameTable.java https://github.com/Balu-Varanasi/BabyNamesApp/blob/master/src/balu/android/CommonNames.java

Could you please help me in fixing this problem?

  • 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-05-26T15:28:23+00:00Added an answer on May 26, 2026 at 3:28 pm

    I’ve got it:

    In CommonNames.java you ‘re using this code:

     ListView cnListView = (ListView)findViewById(R.id.commonName);
    

    But R.id.commonName is TextView.

    Your layout.listview just represents only listview’s item structure.

    You need to create new xml which will describe the Activity’s layout with its ListView component. And then after

    super.onCreate(..);
    

    do

    setContentView(R.layout.your_activity_layout_with_list)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got the following code from here to read an Excel file using
I got the following exception: System.Workflow.Runtime.Hosting.PersistenceException: Type ‘Microsoft.SharePoint.SPWeb’ in Assembly ‘Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’
I've got a strange problem here. Assume that I have a class with some
I have the next code: Process p = Runtime.getRuntime().exec(args); and I want my program
Have got an NSString *str = @12345.6789 and want to find out if there
We have got a custom MembershipProvider in ASP.NET . Now there are 2 possible
We have got loads of options for php + MySQL + Apache combo... Which
I have got a python script which is creating an ODBC connection. The ODBC
I have got a C function in a static library, let's call it A,
I have got the following problem since the server has safe mode turned on,

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.