Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio is not generating zip aligned apk

Tags:

I am using Android Studio 1.2.2

My sdk is well updated and build-tools version installed is 22.0.1

Build > Generate Signed Apk

I only get app-release-unaligned.apk in (app/build/outputs/apk/)

I have already googled and tried:

  1. Copy Pasting "zipalign.exe" from build-tools folder to : (i) sdk/tools/ (ii) sdk/platform-tools/

  2. Adding "zipAlignEnabled true" under buildTypes in build.gradle

  3. Gradle zipAlign task not working?

Please help solve this issue, I want to zipalign using Android Studio.

This is my first app i am trying to publish !!!

like image 783
Shivam Avatar asked Jun 30 '15 23:06

Shivam


People also ask

Why zipalign APK?

zipalign is a zip archive alignment tool. It ensures that all uncompressed files in the archive are aligned relative to the start of the file. This allows those files to be accessed directly via mmap(2) , removing the need to copy this data in RAM and reducing your app's memory usage.

Which file is mandatory to Generate signed APK?

Generate a signed APK file, open the Build menu from the toolbar and select Generate Signed Bundle/APK. Select between creating an Android App Bundle and APK file. Enter Key store path, Key store password, Key alias, and the Key password.

What is a signed APK file?

Android requires that all APKs be digitally signed with a certificate before they are installed on a device or updated. When releasing using Android App Bundles, you need to sign your app bundle with an upload key before uploading it to the Play Console, and Play App Signing takes care of the rest.


1 Answers

It is pretty easy to generate the signed apk file with Android Studio.

Here are the steps:

enter image description here

enter image description here

enter image description here

like image 166
yushulx Avatar answered Sep 21 '22 00:09

yushulx