Bug 4967 - Images in the .jar file are zero in the file .apk
Summary: Images in the .jar file are zero in the file .apk
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Tools and Addins ()
Version: 4.1.x
Hardware: Macintosh Mac OS
: --- major
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-05-09 11:00 UTC by Chris Hardy [MSFT]
Modified: 2012-05-11 08:36 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Chris Hardy [MSFT] 2012-05-09 11:00:50 UTC
When using a .jar file in the following project: http://dl.dropbox.com/u/90453/ChartExampleZeroImages.zip

The images extracted from the .jar file appear as zero byte images in the resulting .apk file and are not useable.
Comment 1 Jonathan Pryor 2012-05-09 12:04:03 UTC
Fixed in ef6e2f96.
Comment 3 Jonathan Pryor 2012-05-10 15:56:53 UTC
To reproduce:

# download ChartExampleZeroImages.zip
$ unzip ChartExampleZeroImages.zip
$ cd ChartExample
$ msbuild /t:SignAndroidPackage ChartExample.csproj
$ unzip -l bin/Debug/ChartExample.ChartExample-Signed.apk  | grep png$

If it fails, the output will be:

        0  05-09-12 10:51   org/achartengine/image/zoom-1.png
        0  05-09-12 10:51   org/achartengine/image/zoom_in.png
        0  05-09-12 10:51   org/achartengine/image/zoom_out.png

If it worked, the .png files will have a non-zero size.
Comment 4 PJ 2012-05-10 17:00:42 UTC
Just reproduced on 5a7f77b06d75fc7aef92e05d2370fb374d64b473.
Comment 5 Duncan Mak 2012-05-10 20:31:43 UTC
I have the latest 4.2-series build and it looks like the fix is in:

duncan@dynamic-057:ChartExample$ /Developer/MonoAndroid/usr/bin/mandroid --version
monodroid 4.2.0.225863041
duncan@dynamic-057:ChartExample$ unzip -l bin/Debug/ChartExample.ChartExample-Signed.apk  | grep png$
     2200  05-10-12 20:29   res/drawable/icon.png
     1139  05-10-12 20:29   org/achartengine/image/zoom-1.png
     1099  05-10-12 20:29   org/achartengine/image/zoom_in.png
     1074  05-10-12 20:29   org/achartengine/image/zoom_out.png

I tested on the Mac and the build is: http://storage.bos.xamarin.com/monodroid-mac-4.2-series/d7/d7665819d15f2524faa7bca977e5e47da878b83f/mono-android-4.2.0.225863041.dmg

PJ can test this again on Windows just to be sure tonight.
Comment 6 Duncan Mak 2012-05-10 21:40:10 UTC
I tested this on Windows and it looks like the fix is in.
Comment 7 PJ 2012-05-11 08:31:26 UTC
Verified fixed on MFA 4.2 RC5

Lion:

dynamic-058:ChartExample pjbeaman$ unzip -l bin/Debug/ChartExample.ChartExample-Signed.apk  | grep png$
     2200  05-11-12 08:17   res/drawable/icon.png
     1139  05-11-12 08:17   org/achartengine/image/zoom-1.png
     1099  05-11-12 08:17   org/achartengine/image/zoom_in.png
     1074  05-11-12 08:17   org/achartengine/image/zoom_out.png

Windows 7 64-bit:

http://screencast.com/t/nxe7eFehcQi1