Is app-release.apk zipaligned apk?

心已入冬 提交于 2019-12-21 05:11:26

问题


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.


回答1:


It is both aligned and signed. Ready for publication.

AFAIK zipAlignEnabled is true by default for release builds.




回答2:


You don't need to set that flag.

From official guide

The possible properties and their default values are:



来源:https://stackoverflow.com/questions/27945655/is-app-release-apk-zipaligned-apk

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!