-
Notifications
You must be signed in to change notification settings - Fork 519
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
Cannot merge Android Manifest elements from class library #8262
Comments
I found somebody write on StackOverflow that
|
Android class libraries do not contain an However, what you could probably do for now as a workaround:
We do have a way for /cc @dellis1972 if you have other ideas here. |
The |
Thank you both for the ideas! I'll try it early next week and share the outcome here. |
Outcomes:
I verified both approaches by checking whether the contents of the AndroidManifest I wanted to merge ended up in Am I missing something? Regarding
Should this be picked up automatically? |
…from class library Fixes xamarin#8262 So if a user wants to distribute an AndroidManifest.xml file along with a NuGet the file is currently NOT included in the library .aar file. So lets include it if one is present. This will allow NuGet authors to set default permissions if need be by simply adding the file to the project directory. This also fixes an issue in GenerateLibraryResources where if a manifest file does NOT have a package name.
…from class library Fixes xamarin#8262 So if a user wants to distribute an AndroidManifest.xml file along with a NuGet the file is currently NOT included in the library .aar file. So lets include it if one is present. This will allow NuGet authors to set default permissions if need be by simply adding the file to the project directory. This also fixes an issue in GenerateLibraryResources where if a manifest file does NOT have a package name.
Fix is up #8273. |
Wow! This must be one of the fastest fixes I've seen here! Thank you very much! |
…from class library Fixes xamarin#8262 So if a user wants to distribute an AndroidManifest.xml file along with a NuGet the file is currently NOT included in the library .aar file. So lets include it if one is present. This will allow NuGet authors to set default permissions if need be by simply adding the file to the project directory. This also fixes an issue in GenerateLibraryResources where if a manifest file does NOT have a package name.
…from class library Fixes xamarin#8262 So if a user wants to distribute an AndroidManifest.xml file along with a NuGet the file is currently NOT included in the library .aar file. So lets include it if one is present. This will allow NuGet authors to set default permissions if need be by simply adding the file to the project directory. This also fixes an issue in GenerateLibraryResources where if a manifest file does NOT have a package name.
…from class library Fixes xamarin#8262 So if a user wants to distribute an AndroidManifest.xml file along with a NuGet the file is currently NOT included in the library .aar file. So lets include it if one is present. This will allow NuGet authors to set default permissions if need be by simply adding the file to the project directory. This also fixes an issue in GenerateLibraryResources where if a manifest file does NOT have a package name.
…from class library Fixes xamarin#8262 So if a user wants to distribute an AndroidManifest.xml file along with a NuGet the file is currently NOT included in the library .aar file. So lets include it if one is present. This will allow NuGet authors to set default permissions if need be by simply adding the file to the project directory. This also fixes an issue in GenerateLibraryResources where if a manifest file does NOT have a package name.
…from class library Fixes xamarin#8262 So if a user wants to distribute an AndroidManifest.xml file along with a NuGet the file is currently NOT included in the library .aar file. So lets include it if one is present. This will allow NuGet authors to set default permissions if need be by simply adding the file to the project directory. This also fixes an issue in GenerateLibraryResources where if a manifest file does NOT have a package name.
…from class library Fixes xamarin#8262 So if a user wants to distribute an AndroidManifest.xml file along with a NuGet the file is currently NOT included in the library .aar file. So lets include it if one is present. This will allow NuGet authors to set default permissions if need be by simply adding the file to the project directory. This also fixes an issue in GenerateLibraryResources where if a manifest file does NOT have a package name.
…from class library Fixes xamarin#8262 So if a user wants to distribute an AndroidManifest.xml file along with a NuGet the file is currently NOT included in the library .aar file. So lets include it if one is present. This will allow NuGet authors to set default permissions if need be by simply adding the file to the project directory. This also fixes an issue in GenerateLibraryResources where if a manifest file does NOT have a package name.
Should be fixed in #8273. |
My bad, that PR isn't merged. |
Android application type
.NET Android (net7.0-android, etc.)
Affected platform version
VS 2022 17.8 Pre 1, .NET 8 preview 7
Description
I want to create a Maui class library that uses content provider queries to get data from another application.
For this, it is required to add the
queries
element to the Android Manifest.I want to automatically add the required element to the Android Manifest of the application project that consumes my library so that it works without manually modifying the Android manifest of that application.
I tried doing this using
<AndroidManifestOverlay Include="somefile.xml" />
.Steps to Reproduce
QueriesPackageRegistration.xml
with these contents:<AndroidManifestOverlay Include="QueriesPackageRegistration.xml" />
to the class library project file<AndroidManifestMerger>manifestmerger.jar</AndroidManifestMerger>
- no ideas whether this is still needed in xamarin-android 13?queries
element is not output to the generated Android Manifest.Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: