We upgraded gradle in AS to 8.4.
Now AS insists we have to build with Java 17.
Will the apps still work on older devices that don’t support Java 17 – as long as we don’t use any new features above Java 11?
This is what I set in gradle:
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
freeCompilerArgs = ['-Xjvm-default=all']
jvmTarget = '11'
}
2
no
the only thing that specific the minmum sdk version is minSdk
attribute in gradle module file
(you can locate it in ProjectDir/app/build.gradle.kts
) :
android {
//..
defaultConfig {
minSdk = 27 //8.1
//..
}
}
and there is no android 17 android version
1