Fixed
Status Update
Comments
xa...@google.com <xa...@google.com>
je...@google.com <je...@google.com>
am...@google.com <am...@google.com>
am...@google.com <am...@google.com>
an...@google.com <an...@google.com> #2
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Ladybug | 2024.2.1 Canary 9
- Android Gradle Plugin 8.7.0-alpha09
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
vi...@gmail.com <vi...@gmail.com> #3
In the mean time, until it becomes stable, is there a way around it? Can we merge the FGS types?
Description
Android requires us to specify these tags for foreground services:https://developer.android.com/about/versions/14/changes/fgs-types-required
If we use WorkManager, as suggested, then we have to specify what FGS type we are using:https://developer.android.com/develop/background-work/background-tasks/persistent/how-to/long-running#declare-foreground-service-types-manifest
If we use different FGS types in our application, either from different libraries we control, or from SDKs that we do not, then we want the final declaration to be merged.
Currently this isn't possible as if we have 2 defined
foregroundServiceType
for 1 service (say the work manager service), we get the following error:(project attached)
We would have to use
tools:replace
at the application level, and that does work, but then if the upstream projects or SDKs change, add, or remove aforegroundServiceType
, that will silently fail as we have no way of knowing it didn't merge.