ms-intune-app-sdk-android icon indicating copy to clipboard operation
ms-intune-app-sdk-android copied to clipboard

[.NET MAUI] Incremental build fails with APT2260

Open bannus opened this issue 1 year ago • 3 comments

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

  • Microsoft.Intune.Maui.Essentials.android Version: 9.5.2-beta
  • Operating System (Mac, Linux, Windows) and Version: Windows
  • Visual Studio Version: 17.5.0

Logs

  • MSBuild logs: not available

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 avatar Mar 16 '23 20:03 bannus

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

bannus avatar Mar 16 '23 20:03 bannus

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.

meghandaly avatar Apr 18 '23 20:04 meghandaly

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

Archit-Pikle avatar Jun 01 '23 14:06 Archit-Pikle