0

I've just re-opened an old android project and I wanted to know whats is the min API used because i'm afraid it wont work on old devices such as my phone.

I hope studio includes some function to do so without checking manually every line of code I wrote years ago

arghtype
  • 4,376
  • 11
  • 45
  • 60
  • Your project has `minSdkVersion` set in the manifest or in the Android Gradle closure. It's unclear what you are asking here. –  Jan 24 '19 at 18:07
  • I0m asking whats the best way to see the highest api used in the project – Raffa Montrasio Jan 24 '19 at 18:27
  • This is still unclear. The developer chooses the min and target SDK levels. The min is the lower bound, and the target is the one you have ostensibly tested against. The target SDK is the one that provides most of the forward compatibility offered by the platform. These values will be eventually compiled into the manifest for the app, but it is the developer who sets it as a configuration. –  Jan 24 '19 at 18:32
  • Refs: https://medium.com/androiddevelopers/picking-your-compilesdkversion-minsdkversion-targetsdkversion-a098a0341ebd https://developer.android.com/reference/android/os/Build.VERSION_CODES?utm_campaign=adp_series_sdkversion_010616&utm_source=medium&utm_medium=blog –  Jan 24 '19 at 18:34
  • So if i set min api lower i can run my app on every older mobile ? – Raffa Montrasio Jan 24 '19 at 21:06
  • Please read https://medium.com/androiddevelopers/picking-your-compilesdkversion-minsdkversion-targetsdkversion-a098a0341ebd In theory you can set the minimum to whatever you like, but it depends on the other dependencies in your project. And there are diminishing returns for supporting earlier APIs anyway, as fewer devices will be likely to be found. It complicates linting, as well. For example, I am stuck on API 17 for reasons, but would recommend most people target 19 as the minimum, and the latest reasonable for target (and the latest for compile. –  Jan 24 '19 at 21:49
  • Refs: https://developer.android.com/about/dashboards/ See that anything earlier than 19 represents only a tiny part of the distribution. –  Jan 24 '19 at 21:49
  • Possible duplicate of [What is the minimum SDK version should I choose? (as in Nov 2018)](https://stackoverflow.com/questions/53250247/what-is-the-minimum-sdk-version-should-i-choose-as-in-nov-2018) I'll flag this one as a duplicate for now, unless you can [edit] the question to make it clear what you need help with. –  Jan 24 '19 at 21:59

0 Answers0