1

I'm having trouble using the refactor feature in eclipse (Indigo on Win7 64) to move my hard coded strings to the string.xml file.

Automatic Code Generation for Strings.xml from Eclipse

It creates the entry in string.xml ok but when it builds the appropriate code, part of the code can be duplicated and the resulting code is nonsense. For example:

...setText("Inbox")

becomes:

...setText(R.string.inboxg.inbox)

instead of

...setText(R.string.inbox)

This behavior varies depending on the length of the line and what is being replaced.

Anyone seen this before, know of a fix?

1
  • I've had this same thing happen to me before. It only happened on one string, and I manually renamed it. It occurred after refactoring the package name... so a little different but it did the same concatenation of the half-string. Commented Jul 14, 2011 at 22:25

1 Answer 1

1

I've had a very similar occurrence happen to me when refactoring the package name. I can't really see a way to fix this (besides a global find and replace), perhaps an issue needs to be submitted:

Android google code issue repository:

http://code.google.com/p/android/issues/list

I've done a quick search through the issues and couldn't find anything related.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.