0

I observed a relation between minsdk version and apk size in android. When increase the minsdk version of android app the apk file is getting decreased and reverse also happening. I am wondering is there any relation? if decreasing minsdk version is appending something to code, what exactly it is?

I am expecting some explanation from android geeks. :-) Thank you.

Ajay Naredla
  • 408
  • 5
  • 17
  • https://stackoverflow.com/questions/45609895/what-all-advantages-i-can-get-by-increasing-minsdk-version-in-android – King of Masses Aug 30 '17 at 05:39
  • I don't think so..size of the app depends on the resources(images etc),using libraries etc..You can refer android dev documentation on Reducing size of app :https://developer.android.com/topic/performance/reduce-apk-size.html – Akshay Aug 30 '17 at 05:39
  • not sure, I think compatibility support library is added to the APK (which supports using/running) new API updates on lower APIs , thus the lower the API the more of support library is needed, and as result a bigger APK is genertated ?! – Yazan Aug 30 '17 at 05:39
  • @Akshay I didn't change any line of code and device I am building the app against. I just changed the minsdk and synced the gradle and built the app, I observed the above behavior. – Ajay Naredla Aug 30 '17 at 05:44
  • 1
    min sdk version Is the earliest release of the Android SDK that your application can run on. Which means some functionalities might not be available in lower versions, which is required in your project. And I agree with @Yazan 's point. – Sunil Sunny Aug 30 '17 at 05:44
  • 1
    @Yazan Thanks for the comment. I too thought so, but I am not sure. – Ajay Naredla Aug 30 '17 at 05:45
  • @Ajay_Reddy..it may affect to some extent but not much..like around 5% maybe..did you read the link I gave you?The main key to reduce app size is careful use of resources libraries..removal of unnecessary libraries/dependencies etc – Akshay Aug 30 '17 at 05:50
  • the lower the minsdk, and the higher the targetsdk, the more the compatibility code you'll need shipped within your apk to allow you to call higher API methods – Alessio Aug 30 '17 at 05:50

0 Answers0