在android studio发布app时报错,错误信息:
cannot.find.zip.align=The zipalign tool was not found in the SDK.
Please update to the latest SDK and re-export your application
or run zipalign manually.
Aligning applications allows Android to use application resources
more efficiently.
按错误信息提示:更新SDK或手动运行zipalign。
先手动运行zipalign:
zipalign -p 4 my.apk my-aligned.apk
结果还是报类似的错误,更新SDK
Android Studio->Tools->Android->SDK Manager->Android SDK ->SDK Tools -> 勾选 "Android SDK Build-Tools 28-rc1" -> 点击弹出窗右下角的apply 安装更新。
zipalign是在build tools里,勾选安装更新Android SDK Build-Tools。这里为28-rc1。
安装build tools成功后,在SDK\build-tools\28.0.0-rc1可以找到zipalign.exe。