microsoftconnect / ms-intune-app-sdk-android

Intune App SDK for Android enables data protection features and mobile app management via Microsoft Intune
44 stars 18 forks source link

[.NET MAUI] Incremental build fails with APT2260 #159

Open bannus opened 1 year ago

bannus commented 1 year ago

Intune Android App SDK for .NET MAUI Issue

Summary

Occasionally, incremental build fails due to an error in aapt:

Severity    Code    Description Project File    Line    Suppression State
Error   APT2067 failed processing manifest. TestApp C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\33.0.26\tools\Xamarin.Android.Aapt2.targets 212 
Error   APT2260 resource style/MAMDialogTheme (aka com.microsoft.intune.mam.maui.testapp:style/MAMDialogTheme) not found.

This error is likely caused by an issue with the AndroidManifest.xml file or an Android manifest generation attribute in a source code file.    TestApp C:\src\mam-net\test\TestApp\Platforms\Android\AndroidManifest.xml   1   
Error   APT2260 resource style/MAMDialogTheme (aka com.microsoft.intune.mam.maui.testapp:style/MAMDialogTheme) not found.

This error is likely caused by an issue with the AndroidManifest.xml file or an Android manifest generation attribute in a source code file.    TestApp C:\src\mam-net\test\TestApp\Platforms\Android\AndroidManifest.xml   1   

Details

Logs

Questions to Ask Before Submission

  1. Does the app build and launch without including the Microsoft.Intune.Maui.Essentials.android package? N/A
  2. Does the issue reproduce if you rebuild after deleting the bin and obj output folders? No
  3. Have you checked the .NET MAUI repository for similar issues? If so, please follow the guidance there or add that information to this issue.
  4. Are you using the latest Microsoft.Intune.Maui.Essentials.android NuGet package version? Yes
bannus commented 1 year ago

This is a MAUI issue that will be fixed in their next release, see https://github.com/xamarin/xamarin-android/pull/7780

meghandaly commented 1 year ago

Fix released in Xamarin.Android 33.0.46 and is available in Visual Studio 2022 17.6 Preview 3.

For compatibility purposes, it is recommended that users on the latest VS Preview update Microsoft.Intune.Maui.Essentials.android to our latest release, 9.5.2-beta2.

Archit-Pikle commented 1 year ago

This is still happening on Microsoft.Android.Sdk.Windows version 33.0.46