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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:33:58+00:00 2026-05-17T22:33:58+00:00

I have encountered a strange problem where if I call getString(R.string.somestringname) , from time

  • 0

I have encountered a strange problem where if I call getString(R.string.somestringname), from time to time, even after deleting the R file and recompiling, the incorrect string appears. The emulator is not crashing and a valid string is appearing – it’s just the wrong one.

A sample of my strings.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- Activity Names -->
    <string name="app_name">an app name</string>
    <string name="selector_name">app name | Select</string>
    <string name="create">Create</string>
    <string name="overview_name">appname | Overview</string>
    <string name="another_name">appname | Another View</string> 

.....
    <!-- Edit Note -->
    <string name="placeholder">Foo bar</string> <-- here is a problem
    <string name="created">Created:</string>

</resources>

Here is a sample of code where one of the problems is encountered:

if (note.created != null) {
     createdtext.setText(getString(R.string.created) + " " + Util.longDateFormat(note.created));
}

The text that is output (some of the time) is Foo bar November 03, 2010 (i.e. belonging to R.string.placeholder). What is going on? This is unnervingly making me tempted to hardcode the strings 😉

Thanks for your help!

  • 1 1 Answer
  • 1 View
  • 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-17T22:33:59+00:00Added an answer on May 17, 2026 at 10:33 pm

    Use ant clean install instead of just ant install.

    Java inlines constants like the R.id values into generated bytecode, and sometimes your classes are not being recompiled, even though they need to be. Ideally, ant install would handle this properly; until it does, ant clean install is your friend.

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

Sidebar

Related Questions

I have encountered a strange problem when using the File.Move command. The Programm actually
I have encountered the strange problem, that linux c++ compiler includes the files from
We have encountered a very strange class not found problem in our web app
I have just encountered very strange problem - my GWT app hosted on Google
I have a strange problem with object serialization. in the file documentation it states
I have encountered a very strange problem in using jQuery load() . I used
I have encountered a very strange problem. The jquery slideshow in the below webpage
Going deeper in C#, I have encountered a little (strange) problem with object reference
I've encountered a strange problem in Sql Server. I have a pocket PC application
I have encountered a strange problem on one of our machines. It is a

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.