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 8516013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:18:11+00:00 2026-06-11T05:18:11+00:00

I received an error report for an Android application via Acra. There is no

  • 0

I received an error report for an Android application via Acra. There is no reference to a line number in my code in the stack trace. How do I know were the problem lies with my code? Could anyone please assist me.

Stack trace:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.itse.htsurvey/com.itse.htsurvey.Question2Page2Activity}: java.lang.ClassCastException: android.widget.CompoundButton$SavedState cannot be cast to android.widget.AbsSpinner$SavedState
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1815)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1831)
        at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3188)
        at android.app.ActivityThread.access$600(ActivityThread.java:122)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1028)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:132)
        at android.app.ActivityThread.main(ActivityThread.java:4123)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:491)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
        at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassCastException: android.widget.CompoundButton$SavedState cannot be cast to android.widget.AbsSpinner$SavedState
        at android.widget.AbsSpinner.onRestoreInstanceState(AbsSpinner.java:421)
        at android.view.View.dispatchRestoreInstanceState(View.java:8316)
        at android.view.ViewGroup.dispatchThawSelfOnly(ViewGroup.java:2038)
        at android.widget.AdapterView.dispatchRestoreInstanceState(AdapterView.java:766)
        at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2024)
        at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2024)
        at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2024)
        at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2024)
        at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2024)
        at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2024)
        at android.view.View.restoreHierarchyState(View.java:8295)
        at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1489)
        at android.app.Activity.onRestoreInstanceState(Activity.java:898)
        at android.app.Activity.performRestoreInstanceState(Activity.java:870)
        at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1099)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1793)
        ... 12 more
java.lang.ClassCastException: android.widget.CompoundButton$SavedState cannot be cast to android.widget.AbsSpinner$SavedState
        at android.widget.AbsSpinner.onRestoreInstanceState(AbsSpinner.java:421)
        at android.view.View.dispatchRestoreInstanceState(View.java:8316)
        at android.view.ViewGroup.dispatchThawSelfOnly(ViewGroup.java:2038)
        at android.widget.AdapterView.dispatchRestoreInstanceState(AdapterView.java:766)
        at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2024)
        at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2024)
        at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2024)
        at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2024)
        at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2024)
        at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2024)
        at android.view.View.restoreHierarchyState(View.java:8295)
        at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1489)
        at android.app.Activity.onRestoreInstanceState(Activity.java:898)
        at android.app.Activity.performRestoreInstanceState(Activity.java:870)
        at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1099)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1793)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1831)
        at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3188)
        at android.app.ActivityThread.access$600(ActivityThread.java:122)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1028)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:132)
        at android.app.ActivityThread.main(ActivityThread.java:4123)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:491)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
        at dalvik.system.NativeStart.main(Native Method)

My code com.itse.htsurvey.Question2Page2Activity: http://pastebin.com/gPYyZ0GH

Edit 1: Some more information – I think it might be because of a widget Id conflict. The savedState part indicates that this happened after an Activity recreation? This layout consists of dynamically added views/layouts and they are given id’s at runtime.

Edit 2: Just to confirm that in al the testing done, this is the first time I have received this error. I have not been able to reproduce it.

Edit 3: I was able to reproduce the error when I changed the orientation of the device. How do I then fix this?

  • 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-11T05:18:13+00:00Added an answer on June 11, 2026 at 5:18 am

    After reading up on onSaveInstanceState and onRestoreInstanceState. I added the following code. I am already saving the state of all of the views, so no need for the default implementation of onSaveInstanceState and onRestoreInstanceStat.

    @Override
        public void onSaveInstanceState(Bundle savedInstanceState) {
            saveEnteredData();  
        }
    
        @Override
        public void onRestoreInstanceState(Bundle savedInstanceState) {
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I received an error report with the following stack trace for an app I
I just recieved an error report from a user using my Android application. java.lang.RuntimeException:
I received the following error report from a couple of different users running Android
I received this error on following code.Is this + sign is not available in
I received the following error when I tried to run a C# WinForms application
Recently my application received quite a lot comments that it's not working on Android
I receive the following error in Microsoft SQL Server Report Builder Error While generating
When I tried to open my SharePoint extended site, I received error 500. The
I received the error while trying to display some variable like so: echo id
String s = new String({'h','e','l','l','o'}); I received the error: 1 Invalid expression term '{'

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.