Groceries APK size for the groceries demo app?


#1

I’m new to NS so I don’t have the proportion of file size app from NS output.

For the groceries app - I’ve installed webpack and used uglify and release switches :

npm run build-android-bundle --uglify  --release 

But after that - I’ve seen the output file :

image

Question:

  • It has the -debug postfix . Why is that? I executed it with --release
  • Does 16 mb is a reasonable apk size for the groceries app demo ?

webpack.config.js : http://jsbin.com/vivukecuce/edit?html,output


#2

I think you need to pass those params like this: npm run build-android-bundle -- --uglify --release as that command invoked a script in package.json.


#3

What are those extra -- ? a typo ?


#4

Did you try it?

Since build-android-bundle is a script that’s defined in package.json you need to add those extrac dashes to pass params to the script.

If you religiously oppose to using the extra -- then use npm run ns-bundle --android --build-app --uglify --release because that’s what it translates to.


#5

I thank you.

This is what I get when I run :

npm run ns-bundle --android  --uglify --release  --run-app

I think I need to add those --key-store-* - But all I wanted to see is the final non-debug version.

Question:

How can I see the actual release final file ? Currently I don’t know the size of my release app.


#6

Correct, you need to specify those for a release build.

However, running the same command without --release will be a pretty good indicator of apk size. I mean, --uglify will probably make more of a difference.

Btw I found --release builds are a bit faster (at least in startup time), but I don’t think there will be much difference in filesize.


#7

@Eddy
From your experience - isn’t 16 mb is too big for groceries? ( Nativescripts demo app)
I’m just asking so I can get the proportion/scale of an app size (i’m a nativescript beginner programmer.)


#8

16 mb is about the minimum size of an Angular powered app. Non-Angular apps are a bit smaller. If you start adding plugins with external libraries the app size will increase further of course.

Note that on Android there are ways to split your apk for various architectures but that’s not something I’ve had the need for personally (as I don’t care too much about app size anyway).


#9

I thank you and I apologize for asking a beginner questions.

Again - Thank you.


#10

I think it is explained here…