When hitting the play button in Xamarin I receive this error:
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error MSB6004: The specified task executable location "C:\Users\OP\AppData\Local\Android\android-sdk\\tools\zipalign.exe" is invalid. (MSB6004) (HelloWorld)
When looking at the file path I don't see a zipalign.exe in the folder (also the double \\ seems mysterious).
I just installed Xamarin so maybe it was a bad installation?
Can I turn off zipalign?
Found the solution in the Xamarin forums:
The latest SDK from Google, released today, moved some things around. We're preparing an update to handle the new locations
You can work around the issue by finding the android-sdk directory on your system, then copying zipalign from the build-tools/19.1.0 directory to the tools directory
The Jason suggestion is good, but...
You need to copy C:\Program Files (x86)\Android\android-sdk\build-tools\19.1.0\zipalign.exe not in
C:\Program Files (x86)\Android\android-sdk\tools
but in
C:\Users\yourfolder\AppData\Local\Android\android-sdk\tools
(need to see hide file)
By :)
Edit: Jason comment is: Found the solution in the Xamarin forums:
The latest SDK from Google, released today, moved some things around. We're preparing an update to handle the new locations
You can work around the issue by finding the android-sdk directory on your system, then copying zipalign from the build-tools/19.1.0 directory to the tools directory
Edit 2 : Bug resolved with Xamarin 3.1.223
http://developer.xamarin.com/releases/vs/xamarin.vs_3/xamarin.vs_3.1/
Fixes Fixes a regression introduced by Android SDK Tools r23 and Android Build-tools r20 that changed the path of the zipalign tool.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With