Skip to content

example: build Android with Gradle 9.1 and AGP 9.0.1 - #1261

Merged
hiroshihorie merged 4 commits into
mainfrom
hiroshi/example-android-gradle-9
Oct 26, 2026
Merged

hiroshihorie merged 4 commits into
mainfrom
hiroshi/example-android-gradle-9

Conversation

@hiroshihorie

Copy link
Copy Markdown
Member

Stacked on #1259.

Problem

The example's Android build fails on the current Android Studio before compiling anything:

Error resolving plugin [id: 'dev.flutter.flutter-plugin-loader', version: '1.0.0']
> 25.0.3

Android Studio bundles JDK 25, and the example's Gradle 8.14 wrapper cannot run on it. Gradle 9.1 is the first release that supports Java 25. CI does not hit this because it builds on Java 17.

Change

  • Gradle wrapper 8.14 to 9.1.0
  • Android Gradle plugin 8.11.1 to 9.0.1
  • Kotlin Gradle plugin 2.2.20 to 2.3.20

Same versions as the flutter-webrtc example (flutter-webrtc/flutter-webrtc#2150). The android.builtInKotlin=false and android.newDsl=false flags AGP 9 needs are already in example/android/gradle.properties. They have to stay for now because flutter_background 1.3.1 applies kotlin-android unconditionally. CI's Java 17 is supported by both Gradle 9.1 and AGP 9.0.1.

Example only, so no changeset.

Testing

  • flutter build apk --debug in example/ with Android Studio's bundled JDK 25 and no other changes: builds. That also builds livekit_client, livekit_ffi and flutter_webrtc under AGP 9.
  • Before this change the same command fails with the error above.

This PR targets hiroshi/changelog-2.13.2, and build.yaml only runs for PRs into main, so CI runs once #1259 merges and this PR is retargeted.

2.13.2 was released from release/2.13.2, cut from v2.13.1, so main's CHANGELOG went from 2.13.1 to the next release without it.
livekit_client 2.13.2 already shipped flutter_webrtc 1.6.3 and WebRTC-SDK 150.7871.04, so the next release from main would list the same bump again.
The example's Gradle 8.14 wrapper cannot run on Java 25, which the
current Android Studio bundles, so the Android build failed before
compiling anything. Gradle 9.1 supports Java 25.

Bump the wrapper to 9.1.0, the Android Gradle plugin to 9.0.1 and the
Kotlin Gradle plugin to 2.3.20, the same versions as the flutter-webrtc
example. The builtInKotlin and newDsl flags AGP 9 needs are already in
gradle.properties. CI builds on Java 17, which both support.
@hiroshihorie
hiroshihorie marked this pull request as ready for review October 26, 2026 16:12

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

Base automatically changed from hiroshi/changelog-2.13.2 to main October 26, 2026 16:17
@hiroshihorie
hiroshihorie merged commit cebe128 into main Oct 26, 2026
15 checks passed
@hiroshihorie
hiroshihorie deleted the hiroshi/example-android-gradle-9 branch October 26, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant