//Adding this to the root build.gradle solved my problem, thanks @Yalamber
subprojects {
afterEvaluate { project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
}
}
}
}