I am developing app on Worklight 6.1
version and it contains default common folder which is being created by worklight itself while creating the project. As I am testing size of apk for Android
environment , it gives 2.2MB. Size should be very small because till now I haven't added my files in the project.
My question is why the size is big when creating the default app with worklight as you can say Hello Worklight
project. Size should be in KB.
So let me know whether worklight is adding any extra library for the project while building environment or something else.
If creating a new Worklight project with the Android environment and generating an .apk for it, the .apk weighs 2.3MB.
If you uncompress the .apk you will note that inside the assets folder, the worklight folder that houses the Worklight framework weighs at 1.2MB. If you then take these 1.2MB and compresses only them (so to see what is the framework size when inside the .apk) it will drop to ~500Kb, so out of the 2.3MB of the .apk, Worklight does not take the majority of the file size...
Now, ways to minimize the file size some more:
You can perhaps go to the res folder and remove image files from screen resolution folders that you know you are not going to support in your application, but that will shave a very very small amount of file size.
You can use Google's Closure compiler with the SIMPLE_OPTIMIZATION option (not ADVANCED_OPTIMIZATION, this will break things and is not supported) to minify the files and thus reduce from the size some more.
The above is true also to the app web resources and not just for the Worklight framework files.
You can also enable Google's Android ProGuard which helps in reducing file size as well.