Android Studio is not generating zip aligned apk

I am using Android Studio 1.2.2

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

  • Android Studio - Inspect Code - Exclude generated files
  • Phone number formatting an EditText in Android
  • Android: detect when GPS is turned on/off (or when no app is using it anymore)
  • Android Google Maps v2 - Debug key vs Release key
  • setDisplayHomeAsUpEnabled() + Up Arrow?
  • How to add a button in android?
  • 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 !!!

    Related posts:

    Android Studio SDK location
    Android Select row by Id in Sqlite?
    Calculating distance within a building
    How to attach source to android.jar
    Embed Zxing library without using Barcode Scanner app
    DownloadManager.Request.setNotificationVisibility fails with jSecurityException: invalid value for v...
  • Restart ADB from Android Studio
  • Search value for key in string-array android
  • Android - create a service that runs once a day
  • Can I have onScrollListener for a ScrollView?
  • Pick a directory/file using Intent.ACTION_CREATE_DOCUMENT (Storage Access Framework)
  • Import Project from IntelliJ IDEA to Android Studio
  • 2 Solutions collect form web for “Android Studio is not generating zip aligned apk”

    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

    You probably are generating it, but the release .apk file is placed in a different directory from the other .apk files.

    On my system, for an app called TheApp, .apk files are usually placed in the build/outputs/apk directory:

    TheApp/build/outputs/apk/TheApp-debug.apk
    TheApp/build/outputs/apk/TheApp-debug-unaligned.apk
    TheApp/build/outputs/apk/TheApp-release-unaligned.apk
    

    but the aligned release .apk file is placed directly in the app’s root directory :

    TheApp/TheApp-release.apk
    

    (This was already answered by @yushulx but I hope this shorter answer is clearer).

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.