cannot find zip-align when publishing app
I had the same problem.
And to fix it, I copy the Zipalign file from sdk/build-tools/android-4.4W folder to sdk/tools/
Edited: Since Google updated SDK for Android, new build-tools does fix this problem. So I encouraged everyone to update to Android SDK Build-tools 20 as suggested by Pang in the post below.
the zipalign tool was not found in the sdk
In Eclipse, go to Window → Android SDK Manager
, check Android SDK **Build-tools** Rev. 20
and then click Install
.
After the update restart Eclipse and try again.
You uploaded an APK that is not zip aligned when running Devops Pipeline Build
The issue was the path to the APK within the pipeline. Once this was set correctly the APK uploaded fine into Google Play Store.
zipalign error : The system cannot find the file specified
Please avoid the [](Square Brackets) and <>
For example:
D:\android-sdk\android-sdk\tools>zipalign -f -v 4 "C:\Users\name\Desktop\project_name\projectname_signed.apk" "C:\Users\name\Desktop\project_name\projectname__zipaligned.apk"
It will work
You uploaded an APK that is not zip aligned error
You can run zipalign manually in command line:
zipalign [-f] [-v] <alignment> infile.apk outfile.apk
Note that zipalign is located inside ${sdk.dir}\tools
For more details visit zipalign
[Update]
Also, If you need to sign it you can run:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore YOURKEYSTORE unsigned.apk alias_name
(jarsigner is located inside java JDK_HOME/bin)
How to zipalign the apk file in Windows
Make sure you have the Android SDK build-Tools installed then check where your SDK is installed mine was at C:\Program Files(x86)\Android\android-sdk\build-tools\23.0.1\zipalign
You will find zipAlign in the android build tools then use it like so:
C:\Program Files(x86)\Android\android-sdk\build-tools\23.0.1\zipalign -v 4 infile.apk outfile.apk
Usage
To align infile.apk and save it as outfile.apk:
zipalign [-f] [-v] <alignment> infile.apk outfile.apk
To confirm the alignment of existing.apk:
zipalign -c -v <alignment> existing.apk
The alignment is an integer that defines the byte-alignment boundaries. This must always be 4 (which provides 32-bit alignment) or else it effectively does nothing.
Flags:
-f : overwrite existing outfile.zip
-v : verbose output
-c : confirm the alignment of the given file
output from windows (extra parameters not in the Docs :O) :
Zip alignment utility
Copyright (C) 2009 The Android Open Source Project
Usage: zipalign [-f] [-p] [-v] [-z] <align> infile.zip outfile.zip
zipalign -c [-v] <align> infile.zip
<align>: alignment in bytes, e.g. '4' provides 32-bit alignment
-c: check alignment only (does not modify file)
-f: overwrite existing outfile.zip
-p: page align stored shared object files
-v: verbose output
-z: recompress using Zopfli
ZipAlign Docs
Related Topics
What Does the Filter Parameter to Createscaledbitmap Do
How to Put a Constraintlayout Inside a Scrollview
Android Studio: How to Generate Signed APK Using Gradle
Error in Strings.Xml File in Android
In Fragment on Back Button Pressed Activity Is Blank
Android Download PDF from Url Then Open It with a PDF Reader
How to Remove the Title Text from the Android Actionbar
Background Service Getting Killed in Android
How to Show Popupwindow at Special Location
Don't Collapse Toolbar When Recyclerview Fits the Screen
Running Emulator After Building Android from Source
How to Change App Name Per Gradle Build Type
Stop Scrollview from Setting Focus on Edittext
Android Disable Screen Timeout While App Is Running
How to Implement Google Maps Search by Address in Android
Android Mediaplayer/Videoview Error (1, -2147483648)
Android Facebook Authorization - Can Not Log in When Official Facebook App Is Installed