and then pass $RESOURCES to aapt package. I'm curious if apkbuilder or does
this already.
On Tuesday, July 31, 2012 11:54:53 PM UTC-7, joebowbeer wrote:
> You may receive more help if you post to the Android Developers list, or
> even stackoverflow, because I think most readers of this list are building
> Android images, not apks.
> That being said, the JDOM folks investigated this issue when they were in
> the process of validating JDOM on Android. In their case it was the test
> data that was being loaded:
> https://github.com/hunterhacker/jdom/wiki/JDOM2-and-Android
> https://github.com/hunterhacker/jdom/wiki/JDOM2---Android-Issue---get...
> Their conclusion:
> The methods this.getClass().getResource(...)
>> andthis.getClass().getClassLoader().getResource(...) work as expected, and
>> seemingly identically, on both regular Java and Android. The first one
>> works if you use an absolute path to the resource, or a relative path to
>> the package the this class is in. The second one also works on Android and
>> again you should be careful with your 'path' to the resource, it only
>> effectively works with a relative path, relative to the 'top' of the
>> classpath.
> Other approaches are to move the jar's resources into the assets folder
> and load them from there, or to copy the assets to the file system when the
> app is first started and then read these resources from the file system at
> runtime. The file system URLs are of the form
> /data/data/<package-id>/files/
> See:
> http://developer.android.com/reference/android/content/Context.html#g...()
> --Joe
> On Tuesday, July 31, 2012 12:58:21 PM UTC-7, Michael Bolin wrote:
>> Assuming I have a jar such as libphonenumber (
>> http://code.google.com/p/libphonenumber/) that contains both compiled
>> class files and resources files (such
>> as com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_US) that are
>> loaded via .class.getResourceAsStream(), what is the best way to ensure
>> that the resources end up in the right spot in the APK?