I create a simple project in AndroidStudio with a few modules. Each module\'s gradle script contains the following code:
android {
compileSdkVersion 18
Hmm interesting that I did not find solution that works as I expet it should in Android Studio. But only this solution I present here works so there is no warning in Android Studio editor and works.
define in root build.gradle as everybody do:
buildscript {
ext {
projectAppCompatVersion = 'com.android.support:appcompat-v7:23.3.0'
projectSupportVersion = 'com.android.support:support-v4:23.3.0'
projectCompileSdkVersion = 23
projectMinSdkVersion = 22 // 15 android 4.0.3 for release
projectTargetSdkVersion = 23 //23 requires permission requests , 22 for release
projectBuildToolsVersion = "24.0.0rc2"
}
}
and to access without warnings:
compileSdkVersion project.properties.projectCompileSdkVersion
buildToolsVersion project.properties.projectBuildToolsVersion
but code completion and variables resolution is not working as I would expect for android studio.