Repository navigation
Description
Hi,
building an apk with --dart-define=cronetHttpNoPlay=true is broken with the new Gradle version in Flutter 3.44.0. Building without that option (so, native cronet) works fine.
Error message: [org.chromium.net:cronet-embedded:141.7340.3] ~/.gradle/caches/9.1.0/transforms/2e5c6e1ae32483156f8fb1f259ac32ce/transformed/cronet-embedded-141.7340.3/AndroidManifest.xml Error: Namespace 'org.chromium.net' is used in multiple modules and/or libraries: org.chromium.net:cronet-embedded:141.7340.3, org.chromium.net:httpengine-native-provider:141.7340.3, org.chromium.net:cronet-common:141.7340.3, org.chromium.net:cronet-api:141.7340.3, org.chromium.net:cronet-shared:141.7340.3. Please ensure that all modules and libraries have a unique namespace. For more information, See https://developer.android.com/studio/build/configure-app-module#set-namespace
Minimal example:
$ flutter create cronetbug
$ cd cronetbug
$ flutter pub add cronet_http
$ flutter build apk --dart-define=cronetHttpNoPlay=true
Minimal example with output on my machine (including the working run without that option)
➜ /tmp $ flutter --version
Flutter 3.44.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 559ffa3f75 (2 weeks ago) • 2026-05-15 14:13:13 -0700
Engine • hash fcf463a2242790d1fdcd9d044f533080f5022e18 (revision 4c525dac5e) (15 days ago) • 2026-05-15 19:00:04.000Z
Tools • Dart 3.12.0 • DevTools 2.57.0
➜ /tmp $ flutter create cronetbug
Creating project cronetbug...
Resolving dependencies in `cronetbug`...
Downloading packages...
Got dependencies in `cronetbug`.
Wrote 131 files.
All done!
You can find general documentation for Flutter at: https://docs.flutter.dev/
Detailed API documentation is available at: https://api.flutter.dev/
If you prefer video documentation, consider: https://www.youtube.com/c/flutterdev
In order to run your application, type:
$ cd cronetbug
$ flutter run
Your application code is in cronetbug/lib/main.dart.
➜ /tmp $ cd cronetbug
➜ cronetbug $ flutter pub add cronet_http
Resolving dependencies...
Downloading packages...
+ args 2.7.0
+ cronet_http 1.8.0
+ ffi 2.2.0
+ http 1.6.0
+ http_parser 4.1.2
+ http_profile 0.1.0
+ jni 0.15.2 (1.0.0 available)
matcher 0.12.19 (0.12.20 available)
meta 1.18.0 (1.18.2 available)
+ package_config 2.2.0
+ plugin_platform_interface 2.1.8
test_api 0.7.11 (0.7.12 available)
+ typed_data 1.4.0
vector_math 2.2.0 (2.3.0 available)
+ web 1.1.1
Changed 11 dependencies!
5 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
➜ cronetbug $ flutter build apk --dart-define=cronetHttpNoPlay=true
Resolving dependencies...
Downloading packages...
jni 0.15.2 (1.0.0 available)
matcher 0.12.19 (0.12.20 available)
meta 1.18.0 (1.18.2 available)
test_api 0.7.11 (0.7.12 available)
vector_math 2.2.0 (2.3.0 available)
Got dependencies!
5 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
WARNING: Your app uses the following plugins that apply Kotlin Gradle Plugin (KGP): cronet_http
Future versions of Flutter will fail to build if your app uses plugins that apply KGP.
Please check the changelogs of these plugins and upgrade to a version that supports Built-in Kotlin.
If no such version exists, report the issue to the plugin. If necessary, here is a guide on filing
an issue against a plugin: https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-app-developers#report-incompatible-kotlin-gradle-plugin-usage-to-plugin-authors
If you are a plugin author, please migrate your plugin to Built-in Kotlin using this guide: https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 1368 bytes (99.9% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
[org.chromium.net:cronet-embedded:141.7340.3] ~/.gradle/caches/9.1.0/transforms/2e5c6e1ae32483156f8fb1f259ac32ce/transformed/cronet-embedded-141.7340.3/AndroidManifest.xml Error:
Namespace 'org.chromium.net' is used in multiple modules and/or libraries: org.chromium.net:cronet-embedded:141.7340.3, org.chromium.net:httpengine-native-provider:141.7340.3, org.chromium.net:cronet-common:141.7340.3, org.chromium.net:cronet-api:141.7340.3, org.chromium.net:cronet-shared:141.7340.3. Please ensure that all modules and libraries have a unique namespace. For more information, See https://developer.android.com/studio/build/configure-app-module#set-namespace
/private/tmp/cronetbug/android/app/src/main/AndroidManifest.xml Error:
Validation failed, exiting
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processReleaseMainManifest'.
> Manifest merger failed with multiple errors, see logs
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to generate a Build Scan (Powered by Develocity).
> Get more help at https://help.gradle.org.
BUILD FAILED in 26s
Running Gradle task 'assembleRelease'... 26.6s
Gradle task assembleRelease failed with exit code 1
➜ cronetbug $ flutter build apk
Resolving dependencies...
Downloading packages...
jni 0.15.2 (1.0.0 available)
matcher 0.12.19 (0.12.20 available)
meta 1.18.0 (1.18.2 available)
test_api 0.7.11 (0.7.12 available)
vector_math 2.2.0 (2.3.0 available)
Got dependencies!
5 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
WARNING: Your app uses the following plugins that apply Kotlin Gradle Plugin (KGP): cronet_http
Future versions of Flutter will fail to build if your app uses plugins that apply KGP.
Please check the changelogs of these plugins and upgrade to a version that supports Built-in Kotlin.
If no such version exists, report the issue to the plugin. If necessary, here is a guide on filing
an issue against a plugin: https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-app-developers#report-incompatible-kotlin-gradle-plugin-usage-to-plugin-authors
If you are a plugin author, please migrate your plugin to Built-in Kotlin using this guide: https://docs.flutter.dev/release/breaking-changes/migrate-to-built-in-kotlin/for-plugin-authors
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 1368 bytes (99.9% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
Running Gradle task 'assembleRelease'... 52.9s
✓ Built build/app/outputs/flutter-apk/app-release.apk (43.9MB)
Any further required information please let me know!
Activity
dreautall commentedon May 31, 2026
I tried using the upcoming 1.9.0 version, strangely enough building without Play Services works fine, it now fails on building with play services with the same error message:
[org.chromium.net:cronet-api:141.7340.3] ~/.gradle/caches/9.1.0/transforms/963c24213ab3058b6aa73c06b12bac66/transformed/cronet-api-141.7340.3/AndroidManifest.xml Error: Namespace 'org.chromium.net' is used in multiple modules and/or libraries: org.chromium.net:cronet-api:141.7340.3, org.chromium.net:cronet-shared:141.7340.3. Please ensure that all modules and libraries have a unique namespace. For more information, See https://developer.android.com/studio/build/configure-app-module#set-namespaceIn pubspec.yaml -
flutter clean && flutter pub getwas run after the change:brianquinlan commentedon Jun 22, 2026
It is strange that the latest version doesn't work because the CI tests with the latest flutter version and both the Play and non-Play versions.
carloshenrique-dev commentedon Jun 24, 2026
I added this to my
gradle.propertiesas a temporary workaround to unblock AAB and APK generation:But a proper fix is still needed.
fix build errors
brianquinlan commentedon Jul 1, 2026
This is an upstream bug for this but supposedly, it is fixed:
https://issues.chromium.org/issues/406926302
Hmmm,
org.chromium.net:cronet-api:141.7340.3referenced in #1932 (comment) isn't the latest version. Likewise withorg.chromium.net:cronet-shared:141.7340.3.I wonder why is holding back the use of the most recent version?
brianquinlan commentedon Jul 1, 2026
The version of
cronnet-embeddedused bycronet_http1.9.0depends oncronet_shared:143.7445.0:https://mvnrepository.com/artifact/org.chromium.net/cronet-embedded/143.7445.0/dependencies
brianquinlan commentedon Jul 2, 2026
...but the lastest (
18.1.1) version ofplay-services-cronetdepends on the older version ofcronet-api:https://mvnrepository.com/artifact/com.google.android.gms/play-services-cronet/18.1.1
downtown1629 commentedon Jul 18, 2026
I'm getting the same issue even without
cronetHttpNoPlay=true. Is waiting for Google to updateplay-services-cronet's dependency all we can do? Where should we report it?brianquinlan commentedon Jul 20, 2026
I reopened https://g-issues.chromium.org/issues/406926302
Mohammad-amleh commentedon Sep 22, 2026
when this issue will be resolved ?
fix(episodi): supera il filtro TLS delle reti mobili col motore di Ch…
igordanilovski commentedon Oct 21, 2026
Any updates on this guys?
brianquinlan commentedon Oct 26, 2026
I just released
package:cronet_http1.10.1 that fixes this issue. Please reopen this issue is you still have problems.Merge origin/main into claude/speed-hardening; fix Android Cronet nam…