Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Gradle MergeFailureException with compileSdkVersion 34 and Foreground Service #333

Closed
Nico04 opened this issue Jun 19, 2024 · 3 comments

Comments

@Nico04
Copy link

Nico04 commented Jun 19, 2024

After adding configuration for the Android Foreground Service in AndroidManifest.xml (copied from this package doc), I can't compile anymore, it throw a MergeFailureException.

After a small research, solution was to remove tools:node="merge" part of the config

Before

<service
  android:name="androidx.work.impl.foreground.SystemForegroundService"
  android:foregroundServiceType="dataSync"
  tools:node="merge" />

After

  <service
      android:name="androidx.work.impl.foreground.SystemForegroundService"
      android:foregroundServiceType="dataSync" />

Maybe you could update the documentation ? Or I missed someting ?

Environment
compileSdkVersion 34
Flutter 3.22.2

@781flyingdutchman
Copy link
Owner

Can you share the text of the MergeFailureException?

@Nico04
Copy link
Author

Nico04 commented Jun 19, 2024

It won't help you ^^

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> com.android.manifmerger.ManifestMerger2$MergeFailureException: Error parsing ***\android\app\src\main\AndroidManifest.xml

@781flyingdutchman
Copy link
Owner

Thanks - I see that the example app also does not have the 'merge' line, so I guess it shouldn't be there and I'll remove it in the next version. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants