Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird app/res/values/strings.xml issue #3

Open
GoogleCodeExporter opened this issue Jan 5, 2016 · 4 comments
Open

Weird app/res/values/strings.xml issue #3

GoogleCodeExporter opened this issue Jan 5, 2016 · 4 comments

Comments

@GoogleCodeExporter
Copy link

With the current code, everything works after building with ant clean debug.

But if I make two additions to app/res/values/strings.xml, something gets 
weirdly corrupted.

Specifically, I added license and license_title test strings close to the 
beginning as follows:


    <string name="app_name" translation_description="Application Title">Sky Map</string>
    <string name="license_title">This is a
quick test</string>
    <string name="license">This is a quick test
license</string>
    <string name="menu_settings">Settings</string>


Then some of the app data gets corrupted.  One example problem can be seen as 
follows: Menu | Gallery | Omega Centauri | Find in sky.  Result: not found!  
(In other testing, I had other results, such as its showing Omega Centauri in 
the wrong part of the sky, near the Big Dipper.)


I don't know if it's some subtle bug somewhere in the code, or something wrong 
with my build environment.

Original issue reported on code.google.com by arpruss on 22 Jan 2012 at 7:07

Attachments:

@GoogleCodeExporter
Copy link
Author

Nah, its the wonky way that we handle strings.

When we generate the data for the objects, instead of storing the name with the 
data, we stores a resource ID. The names are then stored as resources. If you 
add resources, you change the resources IDs associated with the names, and the 
object names end up out of whack. To fix it, you need to regenerate the object 
data. To do that, look at 
trunk/tools/src/com/google/android/stardroid/data/README.TXT. The instructions 
there *should* do the trick, although I haven't run it in a while.

We aren't really happy with the way the data currently works. Basically, we 
create proto-buffers for all of the object data. I think we did that for 
performance reasons way back when. We can probably just stick the data in an 
SQLite database and slurp it all in at application startup. That would 
completely remove this problem.

Let me know if you have trouble regenerating the data. I can take a look and 
give you a hand.

Original comment by [email protected] on 23 Jan 2012 at 11:29

@GoogleCodeExporter
Copy link
Author

Ah, so there should be a comment in strings.xml that one shouldn't add or 
delete strings above where the objects are listed without regenerating, and 
then one can freely add and delete strings below that.  At least assuming the 
assignment is sequential.

Original comment by arpruss on 24 Jan 2012 at 12:37

@GoogleCodeExporter
Copy link
Author

Yeah, I'd like more hints on how to build the data.  I did try running "ant 
build" in the tools directory, but I got the error: "Target 'compile' does not 
exist in the project 'Stardroid'."

In the end, in any case, I will want the data storage changed to some 
specialized format so it can be extended to have a lot more stars: 2.5 million 
stars for the Tycho 2 catalog plus a couple million more to supplement that 
will be needed to give a good approximation to what I see in the eyepiece in my 
13" telescope.  The data will need to be divided into sectors by positions and 
magnitude.

Original comment by arpruss on 24 Jan 2012 at 2:18

@GoogleCodeExporter
Copy link
Author

same for me,
as soon as i include an Android Library Project everything get's messed up.
Also i'm unable to even build the tools project using "ant build" because of 
the error:
"Target 'compile' does not exist in the project 'Stardroid'."

It would be really great if you could post an explanation of how to regenerate 
the data in the wiki.

Original comment by [email protected] on 30 Jan 2012 at 4:55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant