java - Why are the apk sizes identical using conditional compile -


i using conditional compile in java using newest android studio newest gradle.

so did little test using

    static final boolean compilethiscode = false;     if (compilethiscode) {        callalargeclass();     } 

and created apk with

   static final boolean compilethiscode = true; 

i have expected apks of different sizes since callalargeclass large class

but apks compilethiscode = true , compilethiscode = false have same size

could please me understand why if java doing conditional compile ?

this influence runtime memory consumption. apk size depends on libraries , resources (res folder). "hello world" in project multiple big 3d party libraries can hit 65k limit.

you can exclude unused dependences proguard config.


Comments

Popular posts from this blog

ios - Memory not freeing up after popping viewcontroller using ARC -

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -