Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unity Android Build Error WIN32 Exception ZipAlign

Every time I try to build my game for android, I get this error:

Error building Player: Win32Exception: 
ApplicationName='.../.../.../.../adt-bundle-mac-x86_64-20140624/sdk/tools/zipalign',
CommandLine='4"/.../.../.../.../Asteroid2(2)/Temp/StagingArea/Package.apk'". 
CurrentDirectory='Temp/StagingArea'

Any ideas? I'm stumped. I've redownloaded the SDK and that didn't help.

like image 616
Barney Chambers Avatar asked Jul 01 '14 03:07

Barney Chambers


4 Answers

  1. Find your copy of the Android SDK in explorer
  2. Go to build-tools and choose a version (e.g.build-tools\19.1.0)
  3. Copy zipalign.exe
  4. Come back out of build-tools
  5. Go into tools
  6. Paste zipalign.exe
like image 157
OMGtechy Avatar answered Oct 20 '22 03:10

OMGtechy


You need to copy the zipalign tool from sdk/build-tools/android-{version}/ to sdk/tools/

like image 42
Ciprian Avatar answered Oct 20 '22 04:10

Ciprian


In Unity go to Edit>Preferences>External Tools> in "Android SDK Location" select the folder of android-sdk (C:\Program Files (x86)\Android\android-sdk) in my case.

like image 2
Pepon Avatar answered Oct 20 '22 04:10

Pepon


You need to copy zipalign as suggested at accepted answer; but if there are no zipalign file in related folder first you should go tools, run android and then install build-tools

like image 1
ermedian Avatar answered Oct 20 '22 03:10

ermedian