From 1dbeba2cbe4bbefb8711e0645c7d8ea426217880 Mon Sep 17 00:00:00 2001 From: ndonkoHenri Date: Thu, 11 Jun 2026 11:34:59 +0200 Subject: [PATCH 1/5] fix(android): pickFirsts libc++_shared.so to unblock multi-plugin Flet apps Gradle's mergeNativeLibs task aborts when more than one input contributes a file at the same path. serious_python_android (the Python runtime shipped via mobile-forge wheels) bundles libc++_shared.so because cross-compiled wheels link against it; many third-party Flutter plugins (ultralytics_yolo, sentry_flutter, several ML/CV/audio plugins) ship their own copy too. The clash surfaces as > N files found with path 'lib//libc++_shared.so' from inputs: - ...//.../libc++_shared.so - .../serious_python_android/.../libc++_shared.so and breaks any Flet app that combines flet-libcpp-shared-backed wheels with a third-party plugin that also bundles libc++_shared.so (reported in #6570 for a YOLO + opencv-python app). libc++_shared.so is the NDK's shared C++ runtime, and the NDK has held strict ABI compatibility on it since r17 (June 2018). Whichever copy wins Gradle's input ordering, every consumer that linked against libc++_shared will work against it -- which makes pickFirsts the documented, narrowly-scoped escape hatch for this specific collision. The directive is glob-scoped to **/libc++_shared.so so any other future duplicate-native-lib clash still fails loudly rather than getting silently masked. Resolves the runtime crash / build failure in #6570; verified working by the reporter via a local one-line edit before this landed. --- .../android/app/build.gradle.kts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sdk/python/templates/build/{{cookiecutter.out_dir}}/android/app/build.gradle.kts b/sdk/python/templates/build/{{cookiecutter.out_dir}}/android/app/build.gradle.kts index 0e25dd99ee..b7f4adcf2e 100644 --- a/sdk/python/templates/build/{{cookiecutter.out_dir}}/android/app/build.gradle.kts +++ b/sdk/python/templates/build/{{cookiecutter.out_dir}}/android/app/build.gradle.kts @@ -31,6 +31,19 @@ android { "*/x86/libpython*.so", "*/x86_64/libpython*.so", ) + + // serious_python_android ships libc++_shared.so as part of the Python runtime payload + // (the cross-compiled wheels on pypi.flet.dev depend on it at link time). Many third-party + // Flutter plugins (ultralytics_yolo, sentry_flutter, several ML / CV / audio plugins) also + // bundle their own copy. When an app pulls in both, Gradle's mergeNativeLibs task aborts + // with "N files found with path 'lib//libc++_shared.so'" because AGP refuses to silently + // choose between duplicate native libraries (the right default for most .so files). + // + // libc++_shared.so is a documented exception: the NDK has held strict ABI compatibility on it + // since r17, so whichever copy wins input ordering, every consumer that linked against libc++_shared + // will work against it. pickFirsts is the narrowly-scoped escape hatch for exactly this case -- it + // only opens a hole for the matching glob; any other future duplicate-native-lib conflict still fails loudly. + pickFirsts += listOf("**/libc++_shared.so") } } From 00be5bd4a38bc15e90527347c15c47124a158ad4 Mon Sep 17 00:00:00 2001 From: ndonkoHenri Date: Thu, 11 Jun 2026 13:29:27 +0200 Subject: [PATCH 2/5] add changelog entry --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ecd16f4d6..481a94f8df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.85.4 + +### Bug fixes + +* Fix `flet build apk` failing at `mergeDebugNativeLibs` with `N files found with path 'lib//libc++_shared.so'` when an app combines `serious_python_android` with another Flutter plugin that also bundles the NDK C++ runtime ([#6570](https://github.com/flet-dev/flet/issues/6570)) by @ndonkoHenri. + ## 0.85.3 ### Improvements From 7e5c491936770bee30d894bbccafdedc36d5e568 Mon Sep 17 00:00:00 2001 From: ndonkoHenri Date: Thu, 11 Jun 2026 13:29:42 +0200 Subject: [PATCH 3/5] =?UTF-8?q?add=20release=20notes=20for=20versions=200.?= =?UTF-8?q?85.2=E2=80=930.85.4,=200.1.46,=20and=200.1.53?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/docs/updates/release-notes.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/website/docs/updates/release-notes.md b/website/docs/updates/release-notes.md index 329edee14f..01212a365a 100644 --- a/website/docs/updates/release-notes.md +++ b/website/docs/updates/release-notes.md @@ -10,6 +10,9 @@ This page links release announcements, changelogs, and migration notes for Flet ### 0.85.x +- 0.85.4: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0854) +- 0.85.3: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0853) +- 0.85.2: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0852) - 0.85.1: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0851) - 0.85.0: [Announcement](/blog/flet-v-0-85-release-announcement), [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0850), [Breaking changes and deprecations](breaking-changes/index.md#released-in-flet-0850) @@ -213,12 +216,14 @@ This page links release announcements, changelogs, and migration notes for Flet - 0.1.56: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0156) - 0.1.55: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0155) - 0.1.54: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0154) +- 0.1.53: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0153) - 0.1.52: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0152) - 0.1.51: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0151) - 0.1.50: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0150-1) - 0.1.49: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0149) - 0.1.48: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0148) - 0.1.47: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0147) +- 0.1.46: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0146) - 0.1.43: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0143) - 0.1.42: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0142) - 0.1.41: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0141) From 2c940ea6b23768e1c8bacccfef630496b4249db6 Mon Sep 17 00:00:00 2001 From: ndonkoHenri Date: Thu, 11 Jun 2026 13:38:34 +0200 Subject: [PATCH 4/5] update changelog to reference PR #6571 for libc++_shared.so fix --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 481a94f8df..dc84084d03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ### Bug fixes -* Fix `flet build apk` failing at `mergeDebugNativeLibs` with `N files found with path 'lib//libc++_shared.so'` when an app combines `serious_python_android` with another Flutter plugin that also bundles the NDK C++ runtime ([#6570](https://github.com/flet-dev/flet/issues/6570)) by @ndonkoHenri. +* Fix `flet build apk` failing at `mergeDebugNativeLibs` with `N files found with path 'lib//libc++_shared.so'` when an app combines `serious_python_android` with another Flutter plugin that also bundles the NDK C++ runtime ([#6570](https://github.com/flet-dev/flet/issues/6570), [#6571](https://github.com/flet-dev/flet/pull/6571)) by @ndonkoHenri. ## 0.85.3 From 9245e3d07f3345ac860f8298dec14a9c1bff89f5 Mon Sep 17 00:00:00 2001 From: ndonkoHenri Date: Thu, 11 Jun 2026 23:33:24 +0200 Subject: [PATCH 5/5] changelog v0.86.0 --- CHANGELOG.md | 2 +- website/docs/updates/release-notes.md | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc84084d03..269f85d27d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.85.4 +## 0.86.0 ### Bug fixes diff --git a/website/docs/updates/release-notes.md b/website/docs/updates/release-notes.md index 01212a365a..b129946a39 100644 --- a/website/docs/updates/release-notes.md +++ b/website/docs/updates/release-notes.md @@ -8,9 +8,12 @@ This page links release announcements, changelogs, and migration notes for Flet ## Stable releases +### 0.86.x + +- 0.86.0: [Announcement](/blog/flet-v-0-86-release-announcement), [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0860) + ### 0.85.x -- 0.85.4: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0854) - 0.85.3: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0853) - 0.85.2: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0852) - 0.85.1: [Changelog](https://github.com/flet-dev/flet/blob/main/CHANGELOG.md#0851)