Skip to content

Feature/flutter 3.44 compatibility - #98

Open
thearaks wants to merge 3 commits into
yekeskin:mainfrom
CodeAtlas:feature/flutter_3.44_compatibility
Open

Feature/flutter 3.44 compatibility#98
thearaks wants to merge 3 commits into
yekeskin:mainfrom
CodeAtlas:feature/flutter_3.44_compatibility

Conversation

@thearaks

Copy link
Copy Markdown

Fixes Android build issues with Flutter 3.44

thearaks added 3 commits July 20, 2026 16:35
Aligns with the JVM target used by modern Flutter app templates,
avoiding the need for consuming apps to force Java 17 on this
subproject via custom Gradle scripting.
@ncuillery

Copy link
Copy Markdown

The changes in Flutter 3.44 Android compilation caused a jvmTarget version ambiguity error. See https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors

Flutter android compilation process is scanning both the java file and the kt file, causing the error described in #97

This PR fixes both issues, @yekeskin is it possible to move forward with it?

@ralatorre

Copy link
Copy Markdown

Independent confirmation: this exact set of changes (dropping the Kotlin copy of FlutterAvifPlugin, compileSdk 36, Java 17) is what we needed to build flutter_avif_android 3.1.0 in a production app on AGP 9.0.1 / Kotlin 2.3.20 with android.builtInKotlin=false. Debug and release builds are clean with no warnings, and encode output verified on a real device (Pixel 8a) decodes correctly.

Keeping the Java copy is also the more future-proof side to keep: Flutter now deprecates plugins that apply the Kotlin Gradle Plugin, and host apps that set android.builtInKotlin=false would not compile the Kotlin class at all without it.

@eschirni

Copy link
Copy Markdown

I encountered the same issue after upgrading my flutter SDK today. I would love to see this integrated in the real package

@martinogarrizzo5

Copy link
Copy Markdown

Is there any update? I also need this update, please!

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.

5 participants