Sobes.tech
Junior — Middle

What is the difference between Min SDK, Target SDK, and Compile SDK in Android project settings?

sobes.tech AI

Answer from AI

  • Min SDK (minSdkVersion) — the minimum Android version on which the app can run. If the device has a lower version, the app will not be installed.

  • Target SDK (targetSdkVersion) — the Android version the app is optimized for. The system uses this value to apply compatibility and new OS behavioral changes.

  • Compile SDK (compileSdkVersion) — the Android SDK version used to compile the app. It determines available APIs during compilation but does not affect device compatibility.

Example: you can compile with API 33, target API 33, but have a minimum version of 21 so that the app works on older devices.