我怎样才能以一种好的方式签署我的申请?

How can I sign my application a good way?

我有一个非常普通的 Android 应用程序,它根本不需要任何许可。我想将 APK 上传到 Google Play 开发者控制台。

在 Android Studio 中,我按下构建 --> 生成签名 APK... --> 我填写了正确的密码 --> 下一步 --> 构建类型调试 --> 仅签名版本V2(完整的 APK 签名)--> 完成。

我的日志告诉我:APK 已成功生成。

我转到 Google Play 开发者控制台 --> 发布管理 --> 应用发布 --> 编辑测试版 --> 上传 APK。

当我上传刚刚创建的 APK 时,我从 Google 收到以下错误:

Upload failed. You have uploaded an unsigned APK. You must create a signed APK.

这很烦人,因为当我尝试上传根据我签名的 APK 时,它总是会发生。我尝试了几种方法。我做错了什么?

您需要选择Build type Release,勾选签名版本V1和V2。

Signature Versions

Android 7.0 introduces APK Signature Scheme v2, a new app-signing scheme that offers faster app install times and more protection against unauthorized alterations to APK files. By default, Android Studio 2.2 and the Android Plugin for Gradle 2.2 sign your app using both APK Signature Scheme v2 and the traditional signing scheme, which uses JAR signing.

签名 V2 是可选的,但签名 V1 是在 Google Play 上分发所必需的。