1

I am trying to build a Xamarin app in Azure Pipelines. Xamarin Android project is building well locally in Windows / MAC . But Xamarin Android build is failing on Azure Pipelines. I am getting the below error while trying to build the Xamarin.Android app in Azure Pipelines.

#[error]C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Aapt2.targets(87,3): Error APT2000: top-left corner pixel must be either opaque white or transparent.
##[error]Resources\drawable-hdpi-v4\abc_ab_share_pack_mtrl_alpha.9.png(0,0): Error APT2261: file failed to compile.

I don't have this folder in source code. This folder ( drawable-hdpi-v4) is automatically getting generated. I don't know how this folder / image is getting created automatically. Configurations are given below

  • MS Build Latest Version
  • Build Agent : Windows
  • Xamarin Android : 10.3.1.4
  • Visual Studio : 16.6.
Ane
  • 115
  • 9
  • Please add your yaml for the build – FabriBertani Sep 11 '20 at 02:32
  • This is occuring due to an incorrect image in `abc_ab_share_pack_mtrl_alpha.9.png` which is created by android sdks while build I guess. If possible can you change the machine in which you are running? – Nikhileshwar Sep 12 '20 at 10:12
  • Reference links [Similar SO query](https://stackoverflow.com/questions/49359795/android-9-patch-image-error?rq=1) – Nikhileshwar Sep 12 '20 at 10:14
  • Hello, is there any update for this issue? Please check whether [this question](https://stackoverflow.com/questions/25602149/errormust-have-one-pixel-frame-that-is-either-transparent-or-white-in-android-s) can help you. If not, please post your YAML file so that we can investigate further. – Jane Ma-MSFT Sep 17 '20 at 08:46
  • @Error280MonkeyFound: Thanks for the suggestion. I did tried with a different machine for the build. But still getting the same error. – Ane Sep 18 '20 at 15:54
  • @JaneMa-MSFT : I will check the link you had given me in the above reply. Unfortunately, I will not be able to share the Yaml. – Ane Sep 18 '20 at 16:03
  • Thank you all for your suggestions. The issue got fixed after updating Visual Studio 2019 to latest version ( 16.7.3) and Azure Pipeline Agent ( 2.174.2). – Ane Sep 22 '20 at 07:07

1 Answers1

0

The issue got fixed after updating Visual Studio 2019 to latest version ( 16.7.3) and Azure Pipeline Agent ( 2.174.2).

Ane
  • 115
  • 9