How do I know what is available in minSdkVersion in Android Studio?

613 views Asked by At

I have the following android build.gradle file:

android {
    compileSdkVersion 22
    buildToolsVersion "23.0.0 rc2"

    defaultConfig {
        applicationId "com.example.mg.demo2"
        minSdkVersion 16
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.0'
}

Writing code in Android Studio how do I know what is available in the minSdkVersion?

When I use code completion I see:

enter image description here

It says Android 22 which is my targetSdkVersion not the minimal sdk version.

How do I know what is available in the minSdkVersion?

1

There are 1 answers

2
alijandro On

You don't have to worry about that. What APIs are available is handled by the build system. You can see a list of APIs in the file $ANDROID_SDK/platform-tools/api/api-versions.xml.

The available version and deprecated version (if it has) are clear in this XML file.

<class name="android/app/backup/BackupAgentHelper" since="8">
    <extends name="android/app/backup/BackupAgent" />
    <method name="&lt;init>()V" />
    <method name="addHelper(Ljava/lang/String;Landroid/app/backup/BackupHelper;)V" />
</class>