Hopefully I can get an answer to this. I've searched and have asked in
several other venues, including doing my own experimentation, but
nothing seems to work. As this issue is the only one prventing my app
from working on 2.1, I'm hoping for a fix.
My app uses Rhino for scripting. Rhino stores and localizes its various
messages in .properties files which it accesses via
ResourceBundle.getBundle().
Rhino expects to find these properties files on its classpath. When
ResourceBundle.getBundle() is called, it expects to find
org/mozilla/javascript/resources/Messages.properties. It's hard-coded
into ScriptRuntime.java, so short of forking the entire project for this
one change, then maintaining that fork for anyone wishing to build my
app from source, I don't know how to not make this happen.
I tweaked my build system such that it extracts these files from the
Rhino jar, then makes them available to aapt. Using the 1.6 dev tools,
when I build my app, aapt works as I'd expect. Calling it on files in
org/mozilla/javascript/resources adds them to that same directory
structure within the app.
Under 2.1, however, these files are added directly to the root of the
apk. As such, they're no longer found, and my app fails to initialize
its scripting support on launch. Since several essential bits of
functionality are scripted, this makes it far less usable under 2.1.
I've searched, and I find various instances where people have asked this
question but haven't really gotten an answer. I also find suggestions
that this has worked for others and was used in several projects previously.
But so far, my asking about this hasn't gotten any answers, other than
one note that it may not have been officially supported. And, if this is
true, I'm wondering what the expectation is for how we are to do this. I
mean, I can write my own libraries not to do this, to use assets and
resources, but do we really need to fork every third party library that
stores and accesses resources externally? Or am I missing something?
I've poked aapt via the command line, but no switches jump out at me.
I've also done experiments with the 1.6 and 2.1 SDKs, since I still have
an old copy of 1.6 sitting around, and can confirm that this did in fact
once work.
Sorry for the tone of this message. I just spent days trying to chase
this down and debug it under 1.6, now it changes again, blocks my
release and presents no clear path forward. :/
Thanks.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en