Android运行在大量的设备和OS版本上("碎片化"),所以应用必须处理版本兼容性 — 支持较旧版本同时安全地使用较新特性。理解SDK levels、兼容性库和优雅降级很重要。
SDK levels: 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).
