-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Android manifest merger unable to merge manifests containing queries #14285
Copy link
Copy link
Closed
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)team-AndroidIssues for Android teamIssues for Android teamtype: feature request
Description
Description of the problem / feature request:
The Android manifest merger being used by the Bazel android_tools is unable to merge manifests that contain queries that have providers listed. This can be reproduced using the rolling releases and HEAD.
The merge fails with the below exception:
Error: [@maven//:androidx_car_app_app] /private/var/tmp/_bazel_ekamp/490385dd022af32a8a24bff076cf882c/bazel-workers/multiplex-worker-1-ManifestMerger/instantandroid/bazel-out/android-arm64-v8a-dbg/bin/external/maven/androidx_car_app_app_processed_manifest/AndroidManifest.xml:25:9-71 Error:
Missing 'name' key attribute on element provider at [@maven//:androidx_car_app_app] AndroidManifest.xml:25:9-71
Error: [@maven//:androidx_car_app_app] /private/var/tmp/_bazel_ekamp/490385dd022af32a8a24bff076cf882c/bazel-workers/multiplex-worker-1-ManifestMerger/instantandroid/bazel-out/android-arm64-v8a-dbg/bin/external/maven/androidx_car_app_app_processed_manifest/AndroidManifest.xml Error:
Validation failed, exiting
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
This can be reproduced by including the latest version of https://developer.android.com/jetpack/androidx/releases/car-app, which has the following listed in it's manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="androidx.car.app" >
...
<queries>
<provider
android:authorities="androidx.car.app.connection"
/>
...
What operating system are you running Bazel on?
MacOS Big Sur
Have you found anything relevant by searching the web?
Support for queries got added in API 30 while the android_tools are still using v25.0.0.
Any other information, logs, or outputs that you want to share?
Error: [@maven//:androidx_car_app_app] /private/var/tmp/_bazel_ekamp/490385dd022af32a8a24bff076cf882c/bazel-workers/multiplex-worker-1-ManifestMerger/instantandroid/bazel-out/android-arm64-v8a-dbg/bin/external/maven/androidx_car_app_app_processed_manifest/AndroidManifest.xml:25:9-71 Error:
Missing 'name' key attribute on element provider at [@maven//:androidx_car_app_app] AndroidManifest.xml:25:9-71
Error: [@maven//:androidx_car_app_app] /private/var/tmp/_bazel_ekamp/490385dd022af32a8a24bff076cf882c/bazel-workers/multiplex-worker-1-ManifestMerger/instantandroid/bazel-out/android-arm64-v8a-dbg/bin/external/maven/androidx_car_app_app_processed_manifest/AndroidManifest.xml Error:
Validation failed, exiting
Warning:
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
Nov 06, 2021 7:10:28 PM com.google.devtools.build.android.ManifestMergerAction main
SEVERE: Error during merging manifests
com.google.devtools.build.android.AndroidManifestProcessor$ManifestProcessingException: Manifest merger failed with multiple errors, see logs
at com.google.devtools.build.android.AndroidManifestProcessor.mergeManifest(AndroidManifestProcessor.java:186)
at com.google.devtools.build.android.ManifestMergerAction.main(ManifestMergerAction.java:230)
at com.google.devtools.build.android.ResourceProcessorBusyBox$Tool$5.call(ResourceProcessorBusyBox.java:94)
at com.google.devtools.build.android.ResourceProcessorBusyBox.processRequest(ResourceProcessorBusyBox.java:242)
at com.google.devtools.build.android.ResourceProcessorBusyBox.lambda$runPersistentWorker$0(ResourceProcessorBusyBox.java:197)
at com.google.devtools.build.lib.worker.WorkRequestHandler$WorkRequestCallback.apply(WorkRequestHandler.java:223)
at com.google.devtools.build.lib.worker.WorkRequestHandler.respondToRequest(WorkRequestHandler.java:372)
at com.google.devtools.build.lib.worker.WorkRequestHandler.lambda$startResponseThread$1(WorkRequestHandler.java:351)
at java.base/java.lang.Thread.run(Thread.java:829)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)team-AndroidIssues for Android teamIssues for Android teamtype: feature request