Skip to content Skip to sidebar Skip to footer

Android_asset Not Working On Honeycomb?

I have a shipping Android application that displays occasional static webpages that are included in the assets folder. I have been displaying these programmatically like: webView

Solution 1:

Try removing the space. This project and this project both work fine on my XOOM.


Solution 2:

For me the problem was that I compiled with maven. With maven your assets should go into src/main/resources/assets and I had them in src/main/resources — which apparently is wrong.

It seems that Honeycomb stricter about this. If you don't use Maven then make a listing of the files in your apk file (it is just as zip file) and check that your assets correcty inside the asset directory:

7z l target/*.jar

7-Zip [64] 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
p7zip Version 9.20 (locale=utf8,Utf16=on,HugeFiles=on,8 CPUs)

Listing archive: target/HP45-Droid-5.0.0.jar

--
Path = target/HP45-Droid-5.0.0.jar
Type = zip
Physical Size = 465392

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2012-01-01 19:07:10 D....            0            0  META-INF
2012-01-01 19:07:08 .....          125          102  META-INF/MANIFEST.MF
2012-01-01 19:07:06 D....            0            0  assets
2012-01-01 19:07:06 .....        93692        93629  assets/45bk.jpg
2012-01-01 19:07:06 .....         3467         1408  assets/help.html

Post a Comment for "Android_asset Not Working On Honeycomb?"