According to https://developer.android.com/tools/revisions/build-tools.html, this version added support for Android 6.0 (which contains the new requestPermission methods).
Revision 23.0.0 (August 2015)
Added support
for the Android 6.0 (API level 23) release.
I am using the new requestPermission method for android 6.0, but did not update the buildToolsVersion - yet the programs still works, when I expect the build process to fail (see attached image).
so the question is: what exactly does buildToolsVersion do? I like to learn why did the version 22.0.1 work when it shouldn't? Did android studio bypass the values in the build.gradle file?
relevant section of build.gradle
import groovy.swing.SwingBuilder
apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
android {
compileSdkVersion 23
buildToolsVersion "22.0.1"
compileOptions {
encoding "UTF-8"
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
//Minimum FROYO
minSdkVersion 4
targetSdkVersion 23
<snip off unrelated parts>
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:support-v4:23.0.1'
// ads: google play
googlePlayCompile 'com.android.support:appcompat-v7:23.0.1'
googlePlayCompile 'com.google.android.gms:play-services-ads:7.5.0'
testCompile 'org.robolectric:robolectric:2.4'
testCompile 'junit:junit:4.12'
}
EDIT the answer in the other question says that i have to use buildToolsVersion >= compileSdkVersion to use the new features. Yet I'm using the new features without updating the buildToolsVersion.