flutterfire
flutterfire copied to clipboard
🐛 [cloud_firestore] Gradle 8 incorrect package error
Bug report
Describe the bug
- upgrading the latest version of firebase auth forced me to also upgrade to Gradle 8. But now it requires to use namespace inside the build.gradle and not in manifest. So all firebase flutter plugin has to change this simultaneously.
Steps to reproduce
Steps to reproduce the behavior:
- Upgrade firebase flutter auth plugin to latest version
- run your app with firestore plugin on android
- See error or incorrect behavior
Execution failed for task ':cloud_firestore:processDebugManifest'.
> A failure occurred while executing com.android.build.gradle.tasks.ProcessLibraryManifest$ProcessLibWorkAction
> Incorrect package="io.flutter.plugins.firebase.firestore" found in source AndroidManifest.xml: /Users/mcfly/.pub-cache/hosted/pub.dev/cloud_firestore-4.14.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="io.flutter.plugins.firebase.firestore" from the source AndroidManifest.xml: /Users/mcfly/.pub-cache/hosted/pub.dev/cloud_firestore-4.14.0/android/src/main/AndroidManifest.xml.
Expected behavior
App builds and launch
Thanks for the report @g-apparence
I tried by upgrading firebase_auth and cloud_firestore versions to the latest and ran the firestore plugin example on Android which compiled properly.
In the plugin example, I see that all plugins now support AGP 8.0 and has below addition:
Also see https://github.com/firebase/flutterfire/pull/11699
Hi thank you for investing this. I'm still having this
6: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':cloud_firestore:processDebugManifest'.
> A failure occurred while executing com.android.build.gradle.tasks.ProcessLibraryManifest$ProcessLibWorkAction
> Incorrect package="io.flutter.plugins.firebase.firestore" found in source AndroidManifest.xml: /Users/mcfly/.pub-cache/hosted/pub.dev/cloud_firestore-4.14.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="io.flutter.plugins.firebase.firestore" from the source AndroidManifest.xml: /Users/mcfly/.pub-cache/hosted/pub.dev/cloud_firestore-4.14.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.
==============================================================================
With
cloud_firestore: ^4.14.0
and gradle
classpath 'com.android.tools.build:gradle:8.1.1'
It seems that the namespace error is still present.
Thanks for the update. I tried using the plugin example but didn't get the reported error, but based on the report and namespace error, I'll keep the issue open for team's input and tracking.
Yes don't hesitate to ask more infos if you need. It happened since a month.
Hi, i am also facing this issue after updating my firestore package
` Execution failed for task ':cloud_firestore:processDebugManifest'. [ ] > A failure occurred while executing com.android.build.gradle.tasks.ProcessLibraryManifest$ProcessLibWorkAction [ ] > Incorrect package="io.flutter.plugins.firebase.firestore" found in source AndroidManifest.xml: C:\Users\ampon\AppData\Local\Pub\Cache\hosted\pub.dev\cloud_firestore-4.14.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="io.flutter.plugins.firebase.firestore" from the source AndroidManifest.xml: C:\Users\ampon\AppData\Local\Pub\Cache\hosted\pub.dev\cloud_firestore-4.14.0\android\src\main\AndroidManifest.xml.
Caused by: java.lang.RuntimeException: Incorrect package="io.flutter.plugins.firebase.firestore" found in source AndroidManifest.xml: C:\Users\ampon\AppData\Local\Pub\Cache\hosted\pub.dev\cloud_firestore-4.14.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="io.flutter.plugins.firebase.firestore" from the source AndroidManifest.xml: C:\Users\ampon\AppData\Local\Pub\Cache\hosted\pub.dev\cloud_firestore-4.14.0\android\src\main\AndroidManifest.xml.
` Waiting for it to fixed so that i can successfully run my app
Hello @g-apparence, could you provide a repo that can be easily cloned to see in which configuration this happens? Our gradle config should allow for both AGP versions.
Hey @g-apparence. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
@Lyokone can i share the repository with you so that you can check what the problem actually is
Hey @g-apparence. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Hi @g-apparence, were you able to figure out what the problem was?
Hey @g-apparence. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@g-apparence if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.