Search code examples
xamarinmsbuildxamarin.androidazure-devopsaapt

"aapt.exe" exited with code 255


Trying to setup my build server for Xamarin Android builds, but i constantly keeps getting into this issue:

[error]C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1832,3): Error MSB6006: "aapt.exe" exited with code 255.

Anyone know what this error code means? We dont have this issue on the teams local computers. So i assume i am missing something on the build machine, but cannot figure out what.

  • Visual Studio Team Services Build Agent
  • MS 2012 R2 Datacenter
  • Visual Studio 2015 Community
  • Android SDK Manager w/all SDK's up til revision 24
  • Xamarin 6.1.1.0

Solution

  • There must be a problem in build tool. So, can you compare the installed build tool version in your local machine and build machine.

    enter image description here

    Note: Add the following line under PropertyGroup tag in your project file to specify the build tool version.

    <AndroidSdkBuildToolsVersion>23.0.3</AndroidSdkBuildToolsVersion>