Search code examples
androidappcompatactivity

Why include minimum SDK version when you have AppCompatActivity and the standard library?


If AppCompatActivity and the standard library handle the usage of newer APIs in previous versions of Android, why do you need to specify a minimum SDK level?


Solution

  • Because the support library doesn't fix everything. It can't fix some things- there are features that require hardware support. Or are too big to backport. For those you need a way to specify what versions of the SDK aren't supported, hence the minimum SDK level.

    Also the framework DOESN'T handle calling newer functions on older SDK versions. If you call a function added in v26 on v24, you'll crash.