Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin ZipAlign not found

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?

like image 736
Andrew Avatar asked Jun 26 '14 23:06

Andrew


2 Answers

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

like image 186
Andrew Avatar answered Oct 31 '22 14:10

Andrew


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.

like image 41
StefanoM5 Avatar answered Oct 31 '22 14:10

StefanoM5