Hello,
In the case of the AndroidManifest.xml
file in MAUI, what really works is merging the generated files while the program is running.
Every .NET Multi-platform App UI (.NET MAUI) app on Android has an AndroidManifest.xml file, located in the Platforms\Android folder, that describes essential information about your app to build tools, the Android operating system, and Google Play. The manifest file for your .NET MAUI Android app is generated as part of the .NET MAUI build process on Android. This build process takes the XML in the Platforms\Android\AndroidManifest.xml file, and merges it with any XML that's generated from specific attributes on your classes. The resulting manifest file can be found in the obj folder. For example, it can be found at obj\Debug\net8.0-android\AndroidManifest.xml for debug builds on .NET 8. Quated from Android app manifest
Please check whether you set the service attribute in the XML file generated by the merge.
As a supplement, in MAUI, it is generally recommended that you do not set the Service and Activity properties in the manifest file.
Using ServiceAttributes to set up in C# code is more recommended.
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.