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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:28:16+00:00 2026-05-21T16:28:16+00:00

I have a list of values in my XML file which I would like

  • 0

I have a list of values in my XML file which I would like to select based off a spinner selection. For some reason, using an array-string for the spinner works fine, the values are populated into the spinner. For whatever reason, I cannot get the values of the second array to save my life, they are in the same file which has no errors that I can find. Here is the way I am trying to grab them:

String[] some_array = getResources().getStringArray(R.array.playerclassdesc_array);

The spinner is populated differently (no errors doing this part):

ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(
    this, R.array.playerclass_array, android.R.layout.simple_spinner_item);

The error I am getting is:

“04-26 21:41:35.305: ERROR/AndroidRuntime(514): Caused by: android.content.res.Resources$NotFoundException: String array resource ID #0x7f050001”

Which refers directly to the “getResources” line. Does anyone have any clue why this could be happening?

Edit: Here is the xml file (it’s simple)

<?xml version="1.0" encoding="UTF-8"?>
<resources>
    <string name="class_prompt">Choose a class</string>
    <string-array name="playerclass_array">
        <item>Assassin</item>
        <item>Paladin</item>
        <item>Pirate</item>
        <item>Hell Mage</item>
        <item>Winter Witch</item>
        <item>Shadow Walker</item>
        <item>Underthief</item>
        <item>Red Warrior</item>
        <item>Haru Norda</item>
    </string-array>
    <string-array name="playerclassdesc_array">
        <item>This is the Assassin</item>
        <item>This is the Paladin</item>
        <item>This is the Pirate</item>
        <item>This is the Hell Mage</item>
        <item>This is the Winter Witch</item>
        <item>This is the Shadow Walker</item>
        <item>This is the Underthief</item>
        <item>This is the Red Warrior</item>
        <item>This is the Haru Norda</item>
    </string-array>
</resources>
  • 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-21T16:28:16+00:00Added an answer on May 21, 2026 at 4:28 pm

    I hate it when I find the answer right after!

    For some reason, Android was not properly recompiling the XML file the array was in, so after changing the name, and then changing it back, it now works. So my solution is that I had to make some edits in the XML file the array resided in because it wasn’t recompiling correctly despite Eclipse telling me it was.

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

Sidebar

Related Questions

I have an xml file which contains query details like <queries> <query> <name>GetStudentById</name> <statement>select
I have One XML file which will be look like this :: <Note> <NoteId>13328</NoteId>
I have one spinner, and I am populating that. I have list of values
So I have a select option list with values in it. But as with
I have a list of items, which has two values, a name and an
I have created new class to read the data from xml file, which looks
I want to use simplified select one tag, which would generate select items list
I have a xml file which Im reading it from my class <Testclasses> <Class>new
I have an XML DataSource which feeds a repeater control. However, I'm having some
I have an incoming XML file with a list structure: <list> <listItem> <name>elementOne</name> <value>elementOneValue</name>

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.