1

I read that my app will be able to run on the minimum SDK version, 16 in this case:

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.github.dht.screenger"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
...

So what will happen with level 23 dependencies when running on an API 16 device?

Dependencies

compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:recyclerview-v7:23.2.0'
....
Cœur
  • 37,241
  • 25
  • 195
  • 267
Guy
  • 12,488
  • 16
  • 79
  • 119

1 Answers1

1

IT mainly depends on the feature and have you used support library or not, cause in case you have used a feature from the support library that's backward compatible then the library takes care of it else the native behavior kicks in,

Lets take the most common scenario, The status bar

IN API level 16 there is no status bar color tinting but a black status bar is shown but from API 21 on-wards it's there so here as we can see the native behavior of that particular version kicks-in

now lets see the com.android.support:recyclerview-v7:23.2.0

As you can see the v7 specifies that the library is backward compatible till version API version 7( ECLAIR_MR1) so the support library does that for you.

The final case using methods available only in that particular version of SDK

When this happens the compiler throws an error saying you cant use this since the min supported version does not have this methods.

Aniruddha K.M
  • 7,361
  • 3
  • 43
  • 52