未对齐的 android APK 与未签名的 APK 是否相同?需要生成未签名的发布apk [英] Are unaligned android APK's the same as unsigned APK? need to generate release apk that is unsigned
问题描述
我需要在 android studio 中生成一个未签名的 APK.我看到了其他一些关于此的问题.
I need to generate an APK in android studio that is unsigned. I saw a few other questions about this.
从 Android 中的 Gradle 项目导出未签名的 apk工作室
我看到的最佳答案是进入 gradle 任务并执行 assembleRelease.这会在/build/output/apk 文件夹中生成两个 apk,一个是 app-release-unaligned.apk.
The best answer I saw was to go into the gradle tasks an execute assembleRelease. This generates two apks in the /build/output/apk folder one says app-release-unaligned.apk.
未对齐与无符号是一回事吗?
调试 构建类型是否与未签名 相同?
Is the debug build type the same thing as unsigned?
我还尝试添加第二个构建类型,其中我没有指定签名配置,但是 IDE 只是抱怨 t
I also tried adding a second build type where I don't specify a signing config but then the IDE just complains that t
推荐答案
No and No.
未对齐是指数据在 APK(zip 文件)中的结构方式.一个名为 zipalign 的实用程序会修改 APK 以优化数据对齐方式读者.Unaligned 只是跳过 zipalign
阶段.它与 APK 签名无关.
Unaligned refers to how the data is structured within the APK (zip file). A utility called zipalign modifies the APK to align data in a way that is optimised for readers. Unaligned simply skips the zipalign
stage. It has nothing to do with APK signing.
调试只是一种模式,其中在您的应用程序中设置了一个标志,以向 Android 指示您的应用程序可以使用(或附加到)调试器启动.同样,从技术上讲,它与签署您的应用程序无关,但通常的做法是使用不同的签名密钥来调试您的应用程序,并且仅使用您的真实应用程序签名密钥(应保持安全)对最终/发布版本进行签名.
Debug is simply a mode where a flag is set within your App to indicate to Android that your App can be launched with (or attached to by) a debugger. Again, technically, it has nothing to do with signing your App, but it is common practise to use a different signing key for debugging your App and only signing a final/release build with your real App signing key (which should be kept secure).
这篇关于未对齐的 android APK 与未签名的 APK 是否相同?需要生成未签名的发布apk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!