Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

After making target targetSdkVersion and compileSdkVersion to 26, my android apk size increased by 500kb

Tags:

android

After making target targetSdkVersion and compileSdkVersion to 26, my android apk size increased by 500kb.

Android apk size with(targetSdkVersion and compileSdkVersion as 25)=5.6mb

Android apk size with(targetSdkVersion and compileSdkVersion as 26)=6.2mb

After analyzing the apk I got to know that libs folder having ".so" only have increased size.

enter image description here

enter image description here

Can anyone suggest something what really happened and how to minimize this size change??

like image 531
Anish Kumar Dubey Avatar asked Aug 28 '17 10:08

Anish Kumar Dubey


People also ask

Why is my APK size so big?

One of the simple ways to make your APK smaller is to reduce the number and size of the resources it contains. In particular, you can remove resources that your app no longer uses, and you can use scalable Drawable objects in place of image files.

How do I find my target SDK APK?

Navigate to “Appearance & Behavior” > “System Settings” > “Android SDK” and now you can see the SDK versions that were installed in the “API Level” and “Name” columns (focus on “API Level”).

Are APK files compressed?

Android software package files, otherwise known as APKs, are compressed archives of executable code. The archive contains everything an app does, from its GUI and logic to any images it uses.


1 Answers

Set the android:extractNativeLibs flag to false in the <application> element of your app manifest. This will prevent PackageManager from copying out .so files from the APK to the filesystem during installation and will have the added benefit of making delta updates of your app smaller.

like image 127
MalemScha Avatar answered Oct 21 '22 18:10

MalemScha