Closed erikpowa closed 4 years ago
I believe you are asking for proper manifest merging as outlined here: https://github.com/xamarin/xamarin-android/issues/1335
I would highly recommend adding your issue in that thread and providing an upvote (👍) so we can prioritize work on this.
Secondly, as for the manifest merger tool, are you referring to the manifest-merger.jar
found inside {SDK}\tools\lib
?
@JonDouglas
--overlay
, that makes it easy to "plug and play" that feature (something like <AndroidManifestOverlay Inclide="overperm.xml" Order="999">
).Yes, from the tools\lib
. (as standalone, from maven, it takes ~19.4MB with all of it's dependencies, 26.5.0-alpha03, so, from sdk is better choice)
Release status update
A new Release version has now been published that includes the new feature for this item, as implemented in https://github.com/xamarin/xamarin-android/commit/9afac535ad12c64c0459384d48202e2f43964724.
Feature included in Xamarin.Android 10.2.0.100.
Feature included on Windows in Visual Studio 2019 version 16.5. To get the new version that includes the feature, check for the latest updates or install the latest version from https://visualstudio.microsoft.com/downloads/.
Feature included on macOS in Visual Studio 2019 for Mac version 8.5. To get the new version that includes the feature, check for the latest updates on the Stable updater channel.
To enable the new behavior, set the $(AndroidManifestMerger)
MSBuild property to manifestmerger.jar
in the .csproj file:
<PropertyGroup>
<AndroidManifestMerger>manifestmerger.jar</AndroidManifestMerger>
</PropertyGroup>
See the release notes for additional details.
Currently hitting invalid/unmerged
<service>
in merged manifest. (firebase-auth + firebase-firestore)Is there any plan to support the tool from Android SDK? (The current implementation is kinda like this).
Manifest Merger CLI
``` Android Manifest Merger Tool Version 2 Usage: Merger --main mainAndroidManifest.xml --log [VERBOSE, INFO, WARNING, ERROR] --libs [path separated list of lib's manifests] --overlays [path separated list of overlay's manifests] --property [PACKAGE | VERSION_CODE | VERSION_NAME | MIN_SDK_VERSION | TARGET_SDK_VERSION | MAX_SDK_VERSION | NAME | TARGET_PACKAGE | FUNCTIONAL_TEST | HANDLE_PROFILING | LABEL=value] --placeholder [name=value] --out [path of the output file] ```main.xml
```xmloverlay.xml
```xml<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:installLocation="auto" android:versionCode="1" package="com.example" android:versionName="1.0.0-alpha1">
valid_output.xml
```xml