Are Your .apk Files Getting A Bit Fat ???

RichardN

Well-Known Member
Licensed User
Longtime User
Excuse me if this is documented somewhere but I discovered it quite by accident.

We all know that files included in the 'Files' pane of the IDE are copied to the Files.DirAssets folder for use in the application. If they do not appear there then the files are not later available to the code.

I noticed that an .apk package had grown in size from 300k to 800k between compilation versions. Looking inside the .apk (rename it to .zip) I discovered that a bunch of artwork that I had copied to the project /files folder has been included in the /assets folder of the .apk, increasing it's size enormously.

I had innocently put these associated files there to keep the project tidy and altogether. They do not appear in the 'Files' pane and are not included or otherwise referenced in the project, yet they are packaged in the .apk !!!

Don't make my mistake!
 

susu

Well-Known Member
Licensed User
Longtime User
All files in Project/Files will be included in your apk file. That's the way B4A works.
 
Upvote 0

RichardN

Well-Known Member
Licensed User
Longtime User
Thanks for the info Erel.

It does seem rather counter intuitive. If you can't use any assets until the programmer manually adds them then why copy -by default- everything that is sitting in that folder to the installation file ?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…