Forum Xamarin.Android

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

BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
edited July 2014 in Xamarin.Android

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.

Posts

  • CSKCSK USMember

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

  • jerry.yangjerry.yang USMember

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

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
    edited August 2014

    jerry.yang, a few things to check:

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

    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 [email protected] 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):
      %LOCALAPPDATA%\Xamarin\Log

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

  • jerry.yangjerry.yang USMember

    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?

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    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!

  • Toine_de_BoerToine_de_Boer NLUniversity ✭✭

    @BrendanZagaeski Tnx, worked like a charm

  • ShibaKanekiShibaKaneki USMember

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

  • KeyzerSKeyzerS NOMember ✭✭

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

  • stevencallanstevencallan USMember, Beta

    Thanks Brendan, this just helped me!

  • adnanshahidadnanshahid PKMember

    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.

  • GeoffCornerGeoffCorner USMember

    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

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    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.

  • GeoffCornerGeoffCorner USMember

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

  • Samir.IdrisSamir.Idris USMember

    Thankx

Sign In or Register to comment.