Jar size 50MB limit

codenameone

Solution

We limit size since size this directly correlates to build time on the server and might decimate shared resources making builds slower for everyone.

So far everyone who reached the 50mb limit did it either by sticking a huge a amount of resources or just adding the android sdk JARs into the build...

There is some discussion here on shrinking the sizes of jars.

Keep in mind that 50mb will increase by a factor when deployed. E.g. Kitchen Sink is ~700kb when built but 5mb in iOS production and 13mb after going thru the Apple process to the store.

With that same factor a 50mb app will be a 500mb app in production...

Apple and Google restrict things like OTA download for apps crossing the 100mb threshold and while this might not impact a major app like Facebook it can be painful for other companies.

That's one of the major reasons we don't support the full Java API...

I suggest unzipping the resulting JAR and looking inside to see what takes up the most space, then asking on how this can be shrunk/reduced. If it's all code that can't be optimized/reduced in any way and you don't care about the restrictions then the only workaround for you is offline builds, it's far from ideal but it will spare the shared resources.

Problem

When I send an android build to the server, it is failing with the following error in (build.xml line 338) jar exceeds 50MB in size! Please reduce the size of the project The build halts. I wasn't able to find any information regarding the jar size limit. I currently have the "Basic" license.

Original source