Is app-release.apk zipaligned apk?
Asked Answered
J

2

6

I am using Android Studio 1.0.2. When I click assembleRelease in gradle tasks, two files are generated, app-release-unaligned.apk and app-release.apk. I know app-release-unaligned.apk is unaligned but what is app-release.apk? Is it aligned apk? My build.gradle is like below.

buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
        signingConfig signingConfigs.config
        zipAlignEnabled true // Is this necessary or not in Android Studio 1.0.2?
    }
}

Even if I didn't put zipAlignEnabled true, app-release.apk is generated. Is it still necessary in Android Studio 1.0.2? All information I get about zipalign is before Android Studio 1.0 comes out.

Jodhpurs answered 14/1, 2015 at 14:49 Comment(0)
T
6

It is both aligned and signed. Ready for publication.

AFAIK zipAlignEnabled is true by default for release builds.

Torrefy answered 14/1, 2015 at 14:53 Comment(2)
OK. But even if I omit zipAlignEnabled true line, app-release.apk is generated. Is that line necessary?Jodhpurs
AFAIK zipAlignEnabled is true by default for release builds.Torrefy
T
22

You don't need to set that flag.

From official guide

The possible properties and their default values are:

enter image description here

Triiodomethane answered 14/1, 2015 at 15:0 Comment(0)
T
6

It is both aligned and signed. Ready for publication.

AFAIK zipAlignEnabled is true by default for release builds.

Torrefy answered 14/1, 2015 at 14:53 Comment(2)
OK. But even if I omit zipAlignEnabled true line, app-release.apk is generated. Is that line necessary?Jodhpurs
AFAIK zipAlignEnabled is true by default for release builds.Torrefy

© 2022 - 2024 — McMap. All rights reserved.