1

I've ported my LWUIT project to Codename One and successfully sent Android build. The size of resulting .apk file is 2.3M while LWUIT (Thorsten's port) one was 1M smaller (actually it was 700K, but there are 2 large Android themes in Codename One, so it would be around 1.3M - I've checked). Plus, LWUIT .apk classes aren't obfuscated, unlike Codename One.

  1. Are there any techniques to decrease .apk file size?
  2. Is there any switch to remove font file material-design-font.ttf from distribution? It is referenced in the com\codename1\ui\FontImage class, which is used for creating Android-like interfaces and сreating default look-and-feel for CheckBox and RadioButton (+DefaultRefreshIcon).

P.S. Are there nightly builds/updates URL for Eclipse plugin? If no - are there any info on how to update it myself?

McSym28
  • 25
  • 2

1 Answers1

0

Codename One grew significantly as the size pressure we had when building LWUIT was lifted. We also builtin far more functionality over the years which naturally increased the resulting app size eventually. We also have several different rendering pipelines on Android to support all its "quirks" which LWUIT didn't have and would thus perform badly on newer hardware.

To reduce size make sure you defined android.includeGPlayServices=false in your build hints. You can remove most of the builtin resource files using the noExtraResources=true build hint. Currently there is no build hint to remove the icon fonts as those are pretty small anyway (less than 100kb uncompressed).

There is no nightly for the plugins and you don't really need that anyway as the source doesn't hinge on plugin updates see How Does a Codename One Update "Work"

Community
  • 1
  • 1
Shai Almog
  • 51,749
  • 5
  • 35
  • 65