Skip to content

Commit bb19a19

Browse files
committed
Align example Android NDK and Java target with the Flutter template
Two divergences from what `flutter create` generates, both surfaced as build warnings: - ndkVersion was pinned to 27.0.12077973 while connectivity_plus, device_info_plus, flutter_background, flutter_webrtc and jni all require 28.2.13676358. Use `flutter.ndkVersion` (the template's own reference, currently 28.2.13676358) so this tracks the SDK instead of drifting again. - Java source/target compatibility was VERSION_1_8, which now warns "source/target value 8 is obsolete and will be removed in a future release". The template uses VERSION_17. kotlinOptions.jvmTarget moves to 17 alongside it; leaving it at 1_8 would fail with inconsistent JVM-target compatibility. Both warnings are gone from the build output and the APK still builds.
1 parent 0bdb9e1 commit bb19a19

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

example/android/app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ plugins {
88
android {
99
namespace = "io.livekit.example"
1010
compileSdk = flutter.compileSdkVersion
11-
ndkVersion = "27.0.12077973"
11+
ndkVersion = flutter.ndkVersion
1212

1313
compileOptions {
14-
sourceCompatibility = JavaVersion.VERSION_1_8
15-
targetCompatibility = JavaVersion.VERSION_1_8
14+
sourceCompatibility = JavaVersion.VERSION_17
15+
targetCompatibility = JavaVersion.VERSION_17
1616
}
1717

1818
kotlinOptions {
19-
jvmTarget = JavaVersion.VERSION_1_8
19+
jvmTarget = JavaVersion.VERSION_17
2020
}
2121

2222
defaultConfig {

0 commit comments

Comments
 (0)