I noticed that after building the app with Corona the app takes too much space for an app this kind… I figured that building apps in android studio takes a lot less space than in Corona
Why is that and is there a way to lower the size of the app (note: i don’t have any unnecessary files in the project directory)
:rolleyes: Even you make a build with empty main.lua , the size will be more than around 6.0 MB.
Corona add some lib files,Meta-INF files,res folder for App icon.png’s. Thus all this stuff results in app size exceed.
I don’t think there is any possibility where we can reduce app size.
-Assif
@Nerox,
assif_tiger is right. Corona builds include a base set of libraries whether you use them or not. In a nutshell, while it would in theory be possible to strip unused code, this would increase build times (consider how many builds the servers handle at any one time), and would inevitably lead to special case errors.
You are correct also. If you hand-craft you own app and makefiles in ‘Android Studio’ or xCode you will be able to get a smaller binary. However, you will pay a price for that:
- You’ll need to manage your own build environments (1 per OS and/or target)
- You’ll need to code all your own solutions or find them and link them in, hoping they work and don’t have hidden issues that only reveal themselves later.
- You’ll probably end up doing most or all of your coding in native code, then having to re-write it for another target.
- … at the end of the day your development time will take many, many times longer for any non-trivial application/game.
This is the cost and benefit of using an SDK built on a manged server.
Note: Corona is aware of this and has made changes over the years to minimize the size of binaries. Some of these changes are improvements to the libraries/code, others are improvements to the build process, and yet others are the introduction of a plugins system allowing you to include only what you need. Having said that, there is still a large core that is hard to separate into plugins in a meaningful way.
Cheers and welcome to the community. Happy coding.
:rolleyes: Even you make a build with empty main.lua , the size will be more than around 6.0 MB.
Corona add some lib files,Meta-INF files,res folder for App icon.png’s. Thus all this stuff results in app size exceed.
I don’t think there is any possibility where we can reduce app size.
-Assif
@Nerox,
assif_tiger is right. Corona builds include a base set of libraries whether you use them or not. In a nutshell, while it would in theory be possible to strip unused code, this would increase build times (consider how many builds the servers handle at any one time), and would inevitably lead to special case errors.
You are correct also. If you hand-craft you own app and makefiles in ‘Android Studio’ or xCode you will be able to get a smaller binary. However, you will pay a price for that:
- You’ll need to manage your own build environments (1 per OS and/or target)
- You’ll need to code all your own solutions or find them and link them in, hoping they work and don’t have hidden issues that only reveal themselves later.
- You’ll probably end up doing most or all of your coding in native code, then having to re-write it for another target.
- … at the end of the day your development time will take many, many times longer for any non-trivial application/game.
This is the cost and benefit of using an SDK built on a manged server.
Note: Corona is aware of this and has made changes over the years to minimize the size of binaries. Some of these changes are improvements to the libraries/code, others are improvements to the build process, and yet others are the introduction of a plugins system allowing you to include only what you need. Having said that, there is still a large core that is hard to separate into plugins in a meaningful way.
Cheers and welcome to the community. Happy coding.