Closed MikeP0911 closed 1 year ago
It is a requirement now that all services need to define the android:exported
attribute on them.
This error is being raised for the service element included in the AndroidManifest from the Xamarin.Android.Support.Animated.Vector.Drawable
Nuget Package.
The android:exported
requirement is only required for android 12 (API 31) and above. What I suspect happened is you recently updated and now your targetSdkVersion is 31 (or above). I can see from the manifest you posted it is indeed 33
. So a couple of options.
AndroidManifestOverlay
ItemGroup can help with that.See https://developer.android.com/build/manage-manifests for details on how to use the manifest merger.
@dellis1972 Thank you for you reply.
We are currently using Target Android SDK version is Android 11.0 - Api level 30 Minimum Android Version is 9.0 - Api Level 28 Target Android Version is 13.0 - Api level 33
Since our app is built using Xamarin.Forms and uses Intune, Not sure what to be done to balance all the constraints.
Looking forward to your support.
If you can't move your target sdk's or upgrade to AndroidX then I suggest reading up on the manifest merger tooling which I linked in the previous comment https://github.com/xamarin/xamarin-android/issues/8180#issuecomment-1630538029. This should allow you to inject the required android:exported
attribute into the final AndroidManifest.xml file which should allow the build to succeed.
Android application type
.NET Android (net7.0-android, etc.)
Affected platform version
VS 2022 Version 17.6.4
Description
The Working Android Xamarin project is not working recently. Not sure about the reason.
Error:
Severity Code Description Project File Line Suppression State Error C:\Users\saranya.anbalagan\Downloads\test\Mobile\ZipExtractor\ZipExtractor\ZipExtractor.Android\obj\A1_0_LicenseDebug\90\lp\11\jl\AndroidManifest.xml Warning: Namespace 'android.support.graphics.drawable' used in: AndroidManifest.xml, AndroidManifest.xml.
Directory 'obj\A1_0_LicenseDebug\90\lp\11' is from 'Xamarin.Android.Support.Animated.Vector.Drawable.dll'. ZipExtractor.Android C:\Users\saranya.anbalagan\Downloads\test\Mobile\ZipExtractor\ZipExtractor\ZipExtractor.Android\obj\A1_0_LicenseDebug\90\AndroidManifest.xml 48
Xamarin.Forms - 4.4.0.991757 Microsoft.Intune.MAM.Xamarin.Android - 3.0.4635.1 Xamarin.Essentials - 1.4.0 Xamarin.Firebasemessaging -71.1740.4 .NET standard framework - 2.0
Android.Manifetst.XML
<?xml version="1.0" encoding="utf-8"?>
Steps to Reproduce
Did you find any workaround?
No response
Relevant log output