@Jon: Ok I admit I'am a bit confused :S First of all, the file I've linked is the wrong one. The right one is 2mb unzipped and 12kb zipped. But this is the less important thing. The really wired thing is that the first version of the game I've developed and released (downloadeble in stores) use the same, and others, file which are +1mb. The game runs fine on a HTC Desire with Android 2.2. I've checked inside the apk, and all the .xnb I use are ~2mb. How is it possibile?
Jon, do you have any chance to test the .apk in a device with Android 2.2, if I provide to you a valid link for the apk? On Tue, Jul 17, 2012 at 6:31 PM, Jonathan Pryor <j...@xamarin.com> wrote: > On Jul 17, 2012, at 10:18 AM, Francesco Colombo wrote: > > I really appreciate if someone can do a very simple test for me: > > > > 1) Create a new simple android application > > 2) UNZIP and PUT the attached file (logoscreen.xnb) into Assets folder > > logoscreen.xnb is ~4MB in size. Android < 2.3 does not support > decompressing compressed assets that are larger than 1MB in size: > > > http://developer.android.com/about/versions/android-2.3-highlights.html > > "There is no longer a limit on the size of compressed .apk > assets that can be read." > > http://stackoverflow.com/q/2860157/83444 > > There are two fixes: > > 1. Require Android 2.3+ (thus preventing execution on your GS1 device). > (OK, this isn't a fix...) > > 2. Do not compress logoscreen.xnb. This can be done by opening Project > Options, going to the Application tab, and adding .xnb to the Leave the > following resource extensions uncompressed textbox. This also means that > your .apk size will increase by ~4MB, as it won't be compressed. > > An alternate 3rd solution is to not use Android Assets/Resources for the > .xnb. It's apparently a XNA data file, so there's no actual need for it to > be an Android Asset. You can instead set its Build action to > EmbeddedResource, and use the System.Reflection APIs to grab it: > > System.Reflection.Assembly.GetExecutingAssembly () > .GetManifestResourceStream ("logoscreen.xnb"); > > - Jon > > _______________________________________________ > Monodroid mailing list > Monodroid@lists.ximian.com > > UNSUBSCRIBE INFORMATION: > http://lists.ximian.com/mailman/listinfo/monodroid >
_______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid