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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:53:43+00:00 2026-05-23T12:53:43+00:00

I’ve added a spinner to my android app and when I run my app

  • 0

I’ve added a spinner to my android app and when I run my app in the emulator it crashes. Prior to that it ran fine. Here is my code for the spinner…
This is in my class…

public void populateSpinners(){
    Spinner spinner = (Spinner) findViewById(R.id.spinner1);
    ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(
            this, R.array.planets_array, android.R.layout.simple_spinner_item);
    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    spinner.setAdapter(adapter);


    return;
}

This is in my string.xml…

<string name="planet_prompt">Choose a planet</string>
<string-array name="planets_array">
    <item>Mercury</item>
    <item>Venus</item>
    <item>Earth</item>
    <item>Mars</item>
    <item>Jupiter</item>
    <item>Saturn</item>
    <item>Uranus</item>
    <item>Neptune</item>
</string-array>

This is code I “borrowed” from here…

http://developer.android.com/resources/tutorials/views/hello-spinner.html

I added a break point after the spinner was initilazed and ran the app in debug mode. The debugger runs fine and reaches the breakpoint with no errors. However after the breakpoint, the debugger freezes and shows this…

myapp [Android Application] 
myapp [Android Application] 
    DalvikVM[localhost:8615]    
        Thread [<1> main] (Suspended (exception Resources$NotFoundException))   
            Resources.loadXmlResourceParser(int, String) line: 1877 
            Resources.getLayout(int) line: 731  
            PhoneLayoutInflater(LayoutInflater).inflate(int, ViewGroup, boolean) line: 318  
            ArrayAdapter.createViewFromResource(int, View, ViewGroup, int) line: 332    
            ArrayAdapter.getView(int, View, ViewGroup) line: 323    
            Spinner(AbsSpinner).onMeasure(int, int) line: 192   
            Spinner(View).measure(int, int) line: 8171  
            TableRow.getColumnsWidths(int) line: 308    
            TableLayout.findLargestCells(int) line: 497 
            TableLayout.measureVertical(int, int) line: 462 
            TableLayout.onMeasure(int, int) line: 428   
            TableLayout(View).measure(int, int) line: 8171  
            LinearLayout(ViewGroup).measureChildWithMargins(View, int, int, int, int) line: 3132    
            LinearLayout.measureChildBeforeLayout(View, int, int, int, int, int) line: 1012 
            LinearLayout.measureVertical(int, int) line: 381    
            LinearLayout.onMeasure(int, int) line: 304  
            LinearLayout(View).measure(int, int) line: 8171 
            FrameLayout(ViewGroup).measureChildWithMargins(View, int, int, int, int) line: 3132 
            FrameLayout.onMeasure(int, int) line: 245   
            FrameLayout(View).measure(int, int) line: 8171  
            LinearLayout.measureVertical(int, int) line: 526    
            LinearLayout.onMeasure(int, int) line: 304  
            LinearLayout(View).measure(int, int) line: 8171 
            PhoneWindow$DecorView(ViewGroup).measureChildWithMargins(View, int, int, int, int) line: 3132   
            PhoneWindow$DecorView(FrameLayout).onMeasure(int, int) line: 245    
            PhoneWindow$DecorView(View).measure(int, int) line: 8171    
            ViewRoot.performTraversals() line: 801  
            ViewRoot.handleMessage(Message) line: 1727  
            ViewRoot(Handler).dispatchMessage(Message) line: 99 
            Looper.loop() line: 123 
            ActivityThread.main(String[]) line: 4627    
            Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]  
            Method.invoke(Object, Object...) line: 521  
            ZygoteInit$MethodAndArgsCaller.run() line: 868  
            ZygoteInit.main(String[]) line: 626 
            NativeStart.main(String[]) line: not available [native method]  
        Thread [<6> Binder Thread #2] (Running) 
        Thread [<5> Binder Thread #1] (Running) 

And I see this….

image

I read that it means I’m missing the Android source. Is this correct? Why do I need the Android source? Isn’t the Android SDK enough? Or is there some other problem? I’m new to Java/Android (been programming for about a week now) and I’ve been muddling my way through things so please excuse me if this is a “noob” question. 😀 Thanks!

Here are the parts of my DDMS that show the error that is occurring…

07-04 16:57:19.063: DEBUG/dalvikvm(134): GC_EXPLICIT freed 4275 objects / 210048 bytes in 124ms
07-04 16:57:23.311: DEBUG/AndroidRuntime(309): Shutting down VM
07-04 16:57:23.311: WARN/dalvikvm(309): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
07-04 16:57:23.651: ERROR/AndroidRuntime(309): FATAL EXCEPTION: main
07-04 16:57:23.651: ERROR/AndroidRuntime(309): android.content.res.Resources$NotFoundException: File res/layout/simple_spinner_item.xml from xml type layout resource ID #0x1090008
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.content.res.Resources.loadXmlResourceParser(Resources.java:1916)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.content.res.Resources.loadXmlResourceParser(Resources.java:1871)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.content.res.Resources.getLayout(Resources.java:731)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.view.LayoutInflater.inflate(LayoutInflater.java:318)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:332)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.widget.ArrayAdapter.getView(ArrayAdapter.java:323)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.widget.AbsSpinner.onMeasure(AbsSpinner.java:192)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.view.View.measure(View.java:8171)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.widget.TableRow.getColumnsWidths(TableRow.java:308)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.widget.TableLayout.findLargestCells(TableLayout.java:497)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.widget.TableLayout.measureVertical(TableLayout.java:462)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.widget.TableLayout.onMeasure(TableLayout.java:428)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.view.View.measure(View.java:8171)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1012)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.widget.LinearLayout.measureVertical(LinearLayout.java:381)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.view.View.measure(View.java:8171)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.view.View.measure(View.java:8171)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.widget.LinearLayout.measureVertical(LinearLayout.java:526)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.view.View.measure(View.java:8171)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.view.View.measure(View.java:8171)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.view.ViewRoot.performTraversals(ViewRoot.java:801)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.os.Handler.dispatchMessage(Handler.java:99)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.os.Looper.loop(Looper.java:123)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.app.ActivityThread.main(ActivityThread.java:4627)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at java.lang.reflect.Method.invokeNative(Native Method)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at java.lang.reflect.Method.invoke(Method.java:521)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at dalvik.system.NativeStart.main(Native Method)
07-04 16:57:23.651: ERROR/AndroidRuntime(309): Caused by: java.lang.RuntimeException: Assetmanager has been closed
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:483)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     at android.content.res.Resources.loadXmlResourceParser(Resources.java:1898)
07-04 16:57:23.651: ERROR/AndroidRuntime(309):     ... 36 more
07-04 16:57:23.912: WARN/ActivityManager(58):   Force finishing activity com.newapp.practice.app/.myappActivity
07-04 16:57:24.461: WARN/ActivityManager(58): Activity pause timeout for HistoryRecord{44f86260 com.newapp.practice.app/.myappActivity}
07-04 16:57:31.261: DEBUG/dalvikvm(187): GC_EXPLICIT freed 110 objects / 4680 bytes in 117ms
07-04 16:57:36.003: WARN/ActivityManager(58): Activity destroy timeout for HistoryRecord{44f86260 com.newapp.practice.app/.myappActivity}
07-04 16:57:36.422: DEBUG/dalvikvm(261): GC_EXPLICIT freed 755 objects / 54824 bytes in 209ms
  • 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-23T12:53:43+00:00Added an answer on May 23, 2026 at 12:53 pm

    Eclipse tries to access the Android source in order to help you debug the crash. There are some instructions online to attach the source to Eclipse, but they’re quite long-winded, and best left as an exercise for elsewhere (I used http://android.opensourceror.org/2010/01/18/android-source/ at some point).

    If you’d like some help with the crash itself, can you paste the stacktrace from DDMS? (With the breakpoints disabled).

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into

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.