Closed QPAYRE closed 5 months ago
Salut Quentin,
Same issue on Flutter Linux with gradle 8.2.2 and google_ml_kit: ^0.16.3: cdesbois@X300:~/Documents/flutter_app/flutter_application_1$ flutter build apk
Incorrect package="com.google_mlkit_smart_reply" found in source AndroidManifest.xml: /home/cdesbois/.pub-cache/hosted/pub.dev/google_mlkit_smart_reply-0.9.0/android/src/main/AndroidManifest.xml. Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported. Recommendation: remove package="com.google_mlkit_smart_reply" from the source AndroidManifest.xml: /home/cdesbois/.pub-cache/hosted/pub.dev/google_mlkit_smart_reply-0.9.0/android/src/main/AndroidManifest.xml.
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':google_mlkit_smart_reply:processReleaseManifest'.
A failure occurred while executing com.android.build.gradle.tasks.ProcessLibraryManifest$ProcessLibWorkAction Incorrect package="com.google_mlkit_smart_reply" found in source AndroidManifest.xml: /home/cdesbois/.pub-cache/hosted/pub.dev/google_mlkit_smart_reply-0.9.0/android/src/main/AndroidManifest.xml. Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported. Recommendation: remove package="com.google_mlkit_smart_reply" from the source AndroidManifest.xml: /home/cdesbois/.pub-cache/hosted/pub.dev/google_mlkit_smart_reply-0.9.0/android/src/main/AndroidManifest.xml.
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 get full insights. Get more help at https://help.gradle.org.
BUILD FAILED in 2s Running Gradle task 'assembleRelease'... 2 433ms Gradle task assembleRelease failed with exit code 1
My current workaround is to use gradle 7.3.0
When I upgrade the Gradle version to 8.2.1 (latest) and set the targetSdkVersion version and compileSdkVersion to 34 using Flutter 3.16.7 and Dart 3.2.4, I have a namespace error on google_mlkit_smart_reply package :
I reproduced the bug on your exemple too. Steps to reproduce the behavior:
compileSdkVersion
andtargetSdkVersion
to 34namespace 'com.google_mlkit_example'
in android section in build.gradleclasspath 'com.android.tools.build:gradle:8.2.1'
in dependenciesdistributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
If I open my pub_cache and edit the google_mlkit_smart_reply/android/src/main/AndroidManifest.xml file removing the namespace
package="com.google_mlkit_smart_reply"
it runs well locally. Since I'm using Bitrise to Build my iOs and Android apps I have this issue on every android build.In my project I use this version of google mlkit :
I tried to downgrade it but it didn't fix it
I don't know if I missed something but if someone found a solution please share it 🙂