2014-06-26 46 views
15

當Xamarin擊中播放按鈕我收到此錯誤:Xamarin的zipalign沒有找到

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) 

當文件路徑的樣子,我沒有看到文件夾(也雙\\的zipalign.exe看起來很神祕)。

我剛安裝了Xamarin所以也許這是一個糟糕的安裝?

我可以關閉的zipalign?

回答

27

發現在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

+1

這現在已經修復在Xamarin 3.1.223 - http://developer.xamarin.com/releases/vs/xamarin.vs_3/xamarin.vs_3.1/ – WickedW

+0

從這個問題後面幾小時的靈兒,工作..謝謝 – theLazyFinder

12

賈森建議是好的,但...

你需要複製C:\ Program Files文件(x86)的\ Android的\ Android的SDK \構建工具\ 19.1.0 \ zipalign.exe不

C:\ Program Files文件(x86)的\ Android的\ Android的SDK \工具

C:\用戶\ yourfolder \應用程序數據\本地\的Android \ Android的SDK \工具

(需要查看隱藏文件)

通過:)

編輯: 傑森的評論是: 發現在Xamarin論壇解決方案:

從谷歌最新的SDK,今天發佈,搬來搬去一些事情。我們正在準備處理新位置的更新

您可以通過查找系統上的android-sdk目錄,然後將zipalign從build-tools/19.1.0目錄複製到工具目錄

編輯2: 錯誤解決了與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.

+0

對於Mac,複製/Library/Developer/Xamarin/android-sdk-macos/build-tools/19.1。0/zipalign到/ Library/Developers/Xamarin/android-sdk/macos/tools –

+0

在Windows命令提示符下,複製它確實爲我解決了它。 'copy%localappdata%\ Android \ android-sdk \ build-tools \ 20.0.0 \ zipalign.exe%localappdata%\ Android \ android-sdk \ tools' –

0

StefanoM5看法是正確的,只有當你用的選項安裝它 「只是我。」

如果你安裝了它的 「在此計算機上的每個人」,那麼它正在它變成

C:\ Program Files文件(x86)的\ Android的\ Android的SDK \工具

0

如果你是找不到zipalign.exe的位置,然後進入 - > android sdk工具。 然後去 - > Android的SDK構建的工具,如果沒有安裝,然後安裝它,並將其複製到位置C:\用戶\ yourfolder \應用程序數據\本地\的Android \ Android的SDK \工具。