error XA5205: Cannot find `aapt.exe`. Please install the Android SDK Build-tools package RRS feed

  • Question

  • User13824 posted

    Google has updated their SDK tools ("Android SDK Tools" Rev. 23) in a way that also requires installing the latest "Android SDK Build-tools" package, and the Android SDK Manager does not enforce this requirement.

    Fix: once you have installed "Android SDK Tools" Rev. 23 or higher, you must also install "Android SDK Platform-tools" Rev. 20 or higher and "Android SDK Build-tools" Rev 19.1.0 or higher (Rev. 20 recommended). This is necessary because Google moved some of the executables that were previously located in the "Android SDK Tools" package into the "Android SDK Build-tools" package.

    After this step your Android SDK Manager should show up-to-date versions for all three packages:

    Error messages

    Xamarin Studio on Mac

    error XA5205: Cannot find aapt. Please install the Android SDK Build-tools package with the /Users/username/Library/Developer/Xamarin/android-sdk-macosx/tools/android program.

    Visual Studio on Windows

    Cannot find aapt.exe. Please install the Android SDK Build-tools package with the C:\Users\Username\AppData\Local\Android\android-sdk\tools\android.bat program.

    Tuesday, July 15, 2014 8:48 PM

All replies

  • User58779 posted

    Thanks Brendan. I did the same. now it's working fine.

    Wednesday, July 16, 2014 7:07 AM
  • User64363 posted

    I have updated all the versions, but still show me the error.

    Friday, July 18, 2014 6:33 AM
  • User13824 posted

    jerry.yang, a few things to check:

    1. Are your Xamarin versions up-to-date?
      Windows: Xamarin 3.1.228
      Mac: Xamarin.Android

    2. Is your Android SDK path set to the correct location?
      Windows (Visual Studio): "Tools -> Options -> Xamarin -> Android Settings -> Android SDK Location"
      Windows (Xamarin Studio): "Tools -> Options -> SDK Locations -> Android -> Android SDK"
      Mac: "Xamarin Studio -> Preferences -> SDK Locations -> Android -> Android SDK"

    3. Does the Android SDK path actually contain a copy of aapt? If not, you can delete the "build-tools" folder, and then re-install "Build-tools Rev.20" from the Android SDK Manager. For example, for the default install locations:
      Windows: %LOCALAPPDATA%\Android\android-sdk\build-tools\20.0.0\aapt.exe
      Mac: ~/Library/Developer/Xamarin/android-sdk-macosx/build-tools/20.0.0/aapt

    If none of these turn up anything that looks wrong, feel free to send an e-mail to contact@xamarin.com. As a starting place, you can attach:

    • Version information from Xamarin Studio:
      Windows: "Help -> About -> Show Details -> Copy Information [button]"
      Mac: "Xamarin Studio -> About Xamarin Studio -> Show Details -> Copy Information [button]"

    • Zipped up Xamarin Studio log folder (if you use Xamarin Studio) from "Help -> Open Log Directory".
      Windows: %LOCALAPPDATA%\XamarinStudio-5.0\Logs
      Mac: ~/Library/Logs/XamarinStudio-5.0

    • Version information from Visual Studio:
      "Help -> About Microsoft Visual Studio -> Copy Info [button]"

    • Zipped up Visual Studio log folder (if you use Visual Studio):

    • Enable diagnostic MSBuild output, and then attempt to build. Attach back the full contents of the resulting build output.

    Friday, July 18, 2014 4:57 PM
  • User64363 posted

    Thanks Brendan. It turned out that i only have android-4.4w under build-tools. I have downloaded android android-4.4.2, then it works. Can I know why it didn't work with android-4.4w? Not compatible?

    Monday, July 21, 2014 2:40 AM
  • User13824 posted

    Thanks for the report about the build-tools\android-4.4w\ folder. The short answer is that Xamarin support for Android 4.4W support has not yet been released.

    That said, I also haven't yet found the correct steps to make the Android install process create a build-tools\android-4.4w\ folder. I tried a fresh "default" install of the Android SDK today, and the installer unzipped the build tools to build-tools\20.0.0\. If you happen to recall the steps you followed to install the Android SDK, I'd be interested to know!

    Tuesday, July 22, 2014 3:00 AM
  • User59557 posted

    @BrendanZagaeski Tnx, worked like a charm

    Thursday, July 24, 2014 9:12 AM
  • User57702 posted

    Yeah, it's working for me! Thank you!!

    Monday, August 25, 2014 9:49 AM
  • User49775 posted

    Ah! This just saved my day. Was going crazy here...hehe. Thanks a lot!

    Saturday, August 30, 2014 1:07 PM
  • User146 posted

    Thanks Brendan, this just helped me!

    Saturday, December 6, 2014 6:42 PM
  • User102947 posted

    i have downloaded the sdk from here http://developer.android.com/sdk/index.html#Other and extracted to specified folder . but the error comes that No sdk found at the specified location. please refer to image.

    Tuesday, February 3, 2015 10:08 AM
  • User132106 posted

    This is all very frustrating. I started with Xamarin for the first time this morning. I did a trial install and decided to start my education with the Tasky app. So I unzipped this and tried to run it. I got this error Error 1 Cannot find aapt.exe. Please install the Android SDK Build-tools package with the C:\Users\Geoff\AppData\Local\Android\android-sdk\tools\android.bat program. Tasky.Core.Android

    So I followed the instructions contained in the message. Performing these Android downloads/installation took a very long time and filled my C: drive completely So I backed off and restarted the whole process on a different PC (Still Windows 7 Professional) Again I had to download using Android.bat – again it took a looooong time – but this time my disc was big enough!!

    However after several hours of installation I still get this “Cannot find aapt.exe”

    It is definitely on my disc in :- C:\Users\Geoff\AppData\Local\Android\android-sdk\build-tools\23.0.0\bin There is a picture of Android.bat in the attached file which seems to show that I have the correct and latest SDK Tools, Platform Tools AND Build Tools

    File also contains About info and logs are requested higher up this thread

    Monday, June 1, 2015 4:27 PM
  • User13824 posted

    See https://forums.xamarin.com/discussion/42343/new-installations-cannot-find-aapt-android-sdk-build-tools-23-rc1/p1 (currently announced in the Android forum) for the most recent cause of the "Cannot find `aapt.exe`" error.

    Monday, June 1, 2015 5:52 PM
  • User132106 posted

    Brendan, Thank you, I am over this hurdle, onwards to the next one :-)

    Monday, June 1, 2015 6:46 PM
  • User62684 posted


    Monday, July 11, 2016 6:20 AM