I'm using IntelliJ Idea Community Edition 2017.2.5 and am building an Android app.
My problem is that even if in my app (Gradle) I have:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion "27.0.0"
defaultConfig {
applicationId "com.app.mtvtr"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:27.0.0'
compile 'com.android.support:design:27.0.0'
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
compile 'com.android.support:support-v4:27.0.0'
testCompile 'junit:junit:4.12'
}
Also, on first build of the project, compile for the appcompat, design and support was set to 27+ (which IMHO is bad practice and is already pointed by the Studio as a bad idea), so using which tools that I have, I have set it to 27.0.1, and later to 27.0.0 just for the testing if it might work..
In my Fragments and Activities I have:
And the warning says:
The sdk platform-tools version (26.0.2) is too old to check APIs compiled with API 27; please update
Now, I know that there are topics on SO regarding old and new versions, but I have (to my belief) set the Gradle properly and I am nowhere using platform-tools version 26 or even 26.0.2...
I have tried Restarting and invalidating caches three times.
The project properly builds onto the device and everything works. But, of course, I want to fix the warning. (And not hide it like some would suggest..)
Two things that come to mind are:
Any ideas? :)
It seems that it was an IDE problem because it worked without warnings inside Android Studio 3.0 as it was suggested by CrazyCoder.
It seems that at this moment IntelliJ Idea isn't updated enough to make this work properly. So even while I have been using Idea from the start, I will switch to AS for now. :)
Thanks for your input guys. :)