Unity Android Build Error WIN32 Exception ZipAlign

爱⌒轻易说出口 提交于 2019-12-20 10:23:59

问题


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.


回答1:


  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



回答2:


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




回答3:


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.




回答4:


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




回答5:


To fix this error:

  • Go to C:\Program Files (x86)\Android\android-sdk\build-tools\20.0.0 (you may have different version)
  • Copy zipalign.exe to C:\Program Files (x86)\Android\android-sdk\tools\ (or in your Android SDK path)

Found here




回答6:


I fixed this simply by updating "Tools->Android SDK Build-tools" in the Android SDK Manager to the latest version.



来源:https://stackoverflow.com/questions/24501944/unity-android-build-error-win32-exception-zipalign

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!