我是否应该签署我的 Android APK,即使它们仅在 enterprise/private 上下文中使用?

Should I sign my Android APKs even though they are only used in an enterprise/private context?

我正在构建一个安装在我是设备所有者的多个私人企业 [​​=27=] 设备上的应用程序。

这个问题背后的主要原因是我在这些设备上安装了一个自制的移动设备管理应用程序,它安装了我的应用程序更新,并且在安装过程中它从 "Google Play Protect" 收到错误,因为我的应用程序签名未知来自 Google。 但是,如果我不签署我的申请,我不会收到错误消息。

Should I bother signing my apps in this context, as they will only be side loaded, never posted on Google Play?

是的,因为 Android 不会安装未签名的 APK。

What could or would be the consequences of me not signing my app?

您的应用将无法安装。

However If I do not sign my application, I do not get the error.

您的应用尚未安装。或者,应用程序已签名,可能使用调试密钥库。


因此,如果您的真实问题是"is it OK to sign my app with my debug keystore for private distribution",那么答案是肯定的,只要备份该密钥库即可。如果应用程序具有相同的应用程序 ID 并由相同的签名密钥签名,您只能将其替换为较新版本的应用程序。如果您的密钥库丢失,那么您的应用将永远无法更新。