aapt.exe location incorrect

JamesOBrien.3675JamesOBrien.3675 USMember
edited May 2013 in Xamarin.Android

I downloaded and unzipped Tasty (for Android) from the Xamarin.Studio home page.

I opened it, did a Clean, and then a Build.

The Build fails with the following error:

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error MSB6004: The specified task executable location "C:\Program Files\adt-bundle-windows-x86_64-20130219\sdk\platform-tools\aapt.exe" is invalid. (MSB6004) (TaskyAndroid)

I checked in the SDK (4.2.2) and aapt.exe is actually in ....sdk\build-tools\17.0.0\aapt.exe

I previously built a new app using the "wizard", compiled and ran it right before I tried Tasty.

How do I fix this problem?

Regards,
Jim

«1

Posts

  • DaveTodaroDaveTodaro USMember

    I just ran into this same problem. I've been working through the MvvmCross tutorial and went into the Android SDK manager to add the Intel emulator, and there were a bunch of updates checked. I accepted all of them, then subsequently I'm getting the same error. In my case my path is:

    C:\Users\Dave\AppData\Local\Android\android-sdk\platform-tools\aapt.exe

    Did you happen to just install the level 17 SDK support and that corresponded to the build failing?

  • DaveTodaroDaveTodaro USMember

    Oh, and like you the aapt.exe is actually located in:

    C:\Users\Dave\AppData\Local\Android\android-sdk\build-tools\17.0.0

  • JamesOBrien.3675JamesOBrien.3675 USMember

    We may be on the track of something.

    I used the SDK manager today to add some features in Extras and it updated a number of things including the tools.

    I also built an Atom X86 Emulator including activating VT-x on my laptop.

    So I believe those updates changed something.

    I've looked every where I can think of but I can't find where the path to aapt.exe is defined and I am concerned that there may be other changes caused by the updates and including of the Intel Accelerator.

    Regards,
    Jim

    P.S. How does one report a (possible) bug?

  • TomOpgenorthTomOpgenorth CAXamarin Team Xamurai

    This issue is caused by Google changing around the directory structure of the Android SDK with their latest updates. We know about this, and hopeful a hotfix will be arriving very soon.

    @Jim.1553 Xamarin uses Bugzilla to capture and track bug reports

  • StevenTheEvenStevenTheEven SEMember ✭✭✭

    So we should hold back on "updating" anything in the SDK-manager for now?

  • TomOpgenorthTomOpgenorth CAXamarin Team Xamurai

    Probably good advice for now.

  • BrianBirdBrianBird USUniversity ✭✭

    I updated the Android SDK this morning (before reading this forum) and now I am dead in the water. I can't build any Android projects in Xamarin Studio. Can you give us an ETA on the fix? Or a work-around?
    Thanks!

  • TomOpgenorthTomOpgenorth CAXamarin Team Xamurai

    @BrianBird as a workaround you could try downloading r21 of the Android SDK. I believe you can get this from http://dl.google.com/android/android-sdk_r21-macosx.zip and http://dl.google.com/android/installer_r21-windows.exe

  • JamesOBrien.3675JamesOBrien.3675 USMember

    Unfortunately I need 4.2.2 for my project.

    Also, if you happen to have the "Updates" flag checked in the SDK Manager, it will update automatically before you can stop it. So just going to the SDK Manager to verify that something is installed will cause the update if you happen to have the latest Android SDK. It may also change the directory structure on earlier versions but I have not and do not intend to verifying that. I have enough problems as it is.

    Regards,
    Jim

  • JonathanPryorJonathanPryor USXamarin Team Xamurai

    We will be providing a 4.6.6 release soon which adds support for the latest Android SDK directory locations.

  • olivierDahanolivierDahan FRMember

    Hi jonp, do you know how long "soon" will be ? a matter of hours, days, weeks ? I'm stuck with this problem and it will help if at least I'll be able to planify a bit my time. Thanks in advance !

  • GerryHighGerryHigh USBeta ✭✭✭

    Jon/Tom--does this problem also impact the alpha build (I'm on 4.7.4)? I'm at Google IO and am wanting to try out some of the new location services/geofencing stuff and was going to look at the bindings on the google services lib. Fortunately due to bad wifi my SDK hasn't updated yet.

    Thanks, Gerry

  • JonathanPryorJonathanPryor USXamarin Team Xamurai

    does this problem also impact the alpha build (I'm on 4.7.4)?

    Yes. I don't know when an updated beta will be released, so if you're on the beta DO NOT upgrade your Android SDK.

  • TomOpgenorthTomOpgenorth CAXamarin Team Xamurai

    @gerryhigh - who would have thought that bad wifi would save you from problems. :)

    I haven't tried the alpha build lately, but I'm pretty sure it will be affected by this as well.

  • JonathanPryorJonathanPryor USXamarin Team Xamurai

    do you know how long "soon" will be ? a matter of hours, days, weeks

    Current target is sometime today. Let's see how QA goes...

  • AdityaMehtaAdityaMehta USMember

    I tried the fix that SumBeam suggested and it worked. Now I just need to remember to delete the files after Xamarin pushes out an Update

  • GerryHighGerryHigh USBeta ✭✭✭

    @jonp - QA? That's overrated. Will this be a case once again where the fix goes out to the stable channel first and then takes a while to make it to the alpha channel?

  • JonathanPryorJonathanPryor USXamarin Team Xamurai

    Will this be a case once again where the fix goes out to the stable channel first and then takes a while to make it to the alpha channel?

    Yup.

  • GerryHighGerryHigh USBeta ✭✭✭

    I'm sure you have your reasons but that to me just seems backwards. :)

  • RobertVollmannRobertVollmann USMember
    edited May 2013

    After updating to the new version 4.6.0600 I always get the following error when trying to build my project in Visual Studio 2012:

    Error   1   The "Aapt" task failed unexpectedly.
    System.InvalidOperationException: Sequence contains no elements
       at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
       at Xamarin.Android.Tasks.BuildToolsUtils.GetBuildToolsPath(String androidSdkDirectory)
       at Xamarin.Android.Tasks.Aapt.GenerateFullPathToTool()
       at Microsoft.Build.Utilities.ToolTask.ComputePathToTool()
       at Microsoft.Build.Utilities.ToolTask.Execute()
       at Xamarin.Android.Tasks.Aapt.Execute()
       at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
       at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() 
    
  • olivierDahanolivierDahan FRMember

    It seems to compile both in xamarin studio and VS, thanks for the quick fix !

  • JonathanPryorJonathanPryor USXamarin Team Xamurai

    @RobertVollmann: You appear to have an incomplete Android SDK install: the $ANDROID_SDK_PATH/build-tools directory exists, but there is no directory within it to create $ANDROID_SDK_PATH/build-tools/*/aapt.

    Please install the Android SDK Build-tools package within $ANDRDOID_SDK_PATH/tools/android.

  • T.J.Purtell.1752T.J.Purtell.1752 USMember ✭✭
    edited May 2013

    @RobertVollmann, I also had this, and after opening the Android SDK Manager a second time, it offered me many more updates. I think it may have been from blind clicking without accepting all license agreements.

  • RobertVollmannRobertVollmann USMember

    Ah, thank you very much! Opening the SKA Manager a second time did the trick.

  • BrianBirdBrianBird USUniversity ✭✭

    The new version (Xamarin.Android 4.6.6) solved the problem. (I tested it on my win 8 machine.) Thanks!

  • bitfrostbitfrost USMember, Beta
    edited May 2013

    Still dead in the water on MACOS, same error latest stable update.

    Nvm,

    After installing and configuring xamarin to point to adt-bundle-mac-x86_64-20130514 and android-ndk-r8e I am back in business.

  • ArthurDentArthurDent USMember ✭✭

    I made the mistake of updating to the latest version of Xamarin Android this morning (when it prompted me to), and now stung by this bug.

    I am trying the thing of updating the Android SDK platform tools (as I type)... will see if this works...

  • DipanjanGhoshDipanjanGhosh USMember

    Hi I'm using the stable version and I tried uninstalling and reinstalling the whole studio and parts of it, But I'm still getting the same error, this is frustrating. It was working before as i was developing some demo for Android. We are evaluating this for a huge project coming up and this is really sad!
    Using 4.0.8

  • DipanjanGhoshDipanjanGhosh USMember

    and xamarin for android is 4.6.0

  • FZelleFZelle DEMember ✭✭✭

    What Part of "GOOGLE CHANGED THE DIRECTORIES" is so hard to understand?

    If you installed or updated the Android SDK just now the directories are messed up by google. The latest 4.6.06 has a fix for that.

  • FaisalWarisFaisalWaris CAMember

    when will the alpha release be updated? I am trying to evaluate F# and it seems that F# android bindings are only available in alpha

  • JonathanPryorJonathanPryor USXamarin Team Xamurai

    We are looking into releasing an un-QA'd alpha soon.

  • SeanMcLeodSeanMcLeod ZAMember ✭✭

    I just installed Xamarin.Android on a new Windows 8 machine today with the Xamarin installer installing Java, the Android SDK etc. and I'm seeing this error with Aapt even though I just checked and I have Xamarin.Android 4.6.6 installed.

  • StevenTheEvenStevenTheEven SEMember ✭✭✭

    Start SDK-manager and do the updates.

  • SeanMcLeodSeanMcLeod ZAMember ✭✭

    Okay that did the trick. The initial posters seemed to run into this issue using a pre 4.6.6 version of Xamarin.Android and then updating their Android SDK. Since I had downloaded only today from Xamarin and had received 4.6.6 I assumed that the bundled Android SDK installed would be compatible without having to install subsequent Android SDK updates.

  • csnincocsninco USMember

    I just downloaded Xamarin Studio and all of its latest toys today (latest 'stable' release). Is there any info for this same error on a Mac OSX? I have verified that aapt is in the appropriate location. No clue how to proceed. As mentioned, it built the Tasky app and ran it a couple of times and then failed with this error. Is it possible that error is happening because I also have Titanium Studio (which builds Android apps with no problems) and the aapt program is in multiple locations (different versions of the SDK)?

  • YuriShteinmanYuriShteinman CAUniversity ✭✭

    And 4.7 broke this again :-(

  • JonathanPryorJonathanPryor USXamarin Team Xamurai

    @YuriShteinman: Times like this, all I can say is:

    I have no idea what I'm doing.

  • JonathanPryorJonathanPryor USXamarin Team Xamurai

    @csninco: Build log output? I'm not aware of any issues on OS X.

Sign In or Register to comment.