if you want to compile with latest version than update & install your SDK to latest which is at this time API 23.
If you really want to compile & provide support of your app on API 16 & want not to add support of later version (which does not make sense for me may be for you its good) then according to your statement
I set compileSdkVersion and minSdkVersion to 16, because I want to
make sure that I don't use any features in later versions of Android
then set compileSdkVersion to 16, minSdkVersion to 16, targetSdkVersion to 16
& dependencies as compile 'com.android.support:appcompat-v6:16.0.0'
check your API 16 section in SDK. it should be install
And you build.gradle should be like this
apply plugin: 'com.android.application'
android {
compileSdkVersion 16
buildToolsVersion "16.0.0"
defaultConfig {
applicationId "com.example.inzi.mapofcontacts"
minSdkVersion 16
targetSdkVersion 16
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-v6:16.0.0'
}
According to your question it may help you.