Use of file:///android_res/drawable/ url works under eclipse but not in production

I have a problem that is driving me nuts. I have a static html file (assets/help/index.html) that needs to include some images. As I want different images for different densities and the images are already included in drawable-{ldpi,mdpi,hdpi} I thought I'd use the following html code:

<img src="file:///android_res/drawable/image.png">

This works excellent under eclipse! Unfortunately in the production version (build with the maven android plugin) the webview that displays the html page shows broken image icons.

I have tried opening the page using loadUrl and loadDataWithBaseUrl (first reading the file myself), the latter with a base url of file:///android_res/drawable. Both attempts succeed under eclipse but fail in the maven version.

So I unpacked both the Eclipse generated apk and the maven generated one and did a diff -r between the two because there must clearly be a difference.

I'm baffled to find only a few trivial differences (mostly signing differences as the eclipse apk is signed with the debug certificate and the maven one with my official certificate). Apart from that, the content of the apks are identical!

Does anyone have any idea what is going on or how to proceed in uncovering more information?

7
задан Pieter 19 May 2011 в 11:12
поделиться