Android gira su una enorme gamma di dispositivi e versioni di sistema operativo ("frammentazione"), quindi le app devono gestire la compatibilità tra versioni — supportando versioni precedenti mentre usano le nuove funzionalità in sicurezza. Comprendere i livelli SDK, le librerie di compatibilità e il degrado graduale è importante.
Livelli SDK: min, target, compile
minSdk → the OLDEST Android version the app supports (older devices can't install it)
→ lower minSdk = more devices reached, but more compatibility work
targetSdk → the version the app is TESTED/optimized against (and opts into its behaviors)
→ should be kept current (Play requires a recent targetSdk)
compileSdk → the SDK version used to COMPILE (access to newer APIs)
→ Balance: support enough old devices (minSdk) while targeting current behavior (targetSdk).
