简体   繁体   English

未签名的版本APK未安装

[英]Unsigned Release APK not installing

Just asking if it's the intended way or a "bug": On Android Studio 3.3 I've generated an APK with release flavour, from 只是问这是预期的方式还是“错误”:在Android Studio 3.3上,我生成了一个带有发行版本的APK,来自

Build -> Build Bundle(s)/APK -> Build APK

then i clicked "locate" and drag and drop the apk (the name is clearly saying that is unsigned) on the emulator (API level PIE). 然后,我单击“定位”,然后将apk(名称显然是未签名的)拖放到模拟器(API级别PIE)上。 The installation fails with "app not installed". 安装失败,显示“未安装应用程序”。 Is there a way to install a unsigned release version? 有没有办法安装未签名的发行版本? Many thanks. 非常感谢。

First of all, it's not a bug. 首先,这不是错误。 Not allowing unsigned apks to install is one of security features. 不允许安装未签名的APK是安全功能之一。 And unsigned apks have some use cases. 未签名的APK有一些用例。

It's confusing but correct way ,for most of android app developers, to build a relase build, for public release, is Build -> Generate Signed Bundle / APK... . 对于大多数android应用程序开发人员来说,构建供公众发布的relase版本是一种令人困惑但正确的方法,即Build-> Generate Signed Bundle / APK...。

Build -> Build Bundle(s) / APK(s) is for developpers and if signing setting is not set, it will generate unsigned apk. Build-> Build Bundle(s)/ APK(s)适用于开发人员,如果未设置签名设置,它将生成未签名的apk。 Signing setting can be set from File -> Project Structure... -> Modules/app -> Signing tab and Build Types tab -> release -> Signing Config. 可以从文件->项目结构...->模块/应用程序->签名选项卡和构建类型选项卡->版本->签名配置中设置签名设置。

Unsigned apk can also be signed with tools other than Android Studio. 未签名的APK也可以使用Android Studio以外的工具进行签名。 Publishers like Google, Amazon etc also do like this. 像Google,Amazon等发行商也是如此。 They sign (wrap) apks with signatures other than the signatures which developpers have signed. 他们使用开发人员已经签名的签名以外的其他签名对apk进行签名(包装)。 "When to sign" is separated from build process, but it doesn't mean allowing unsigned apks to install on devices. “何时签名”与构建过程分开,但这并不意味着允许将未签名的apk安装在设备上。

There are developper tools like apksigner , and it's one of tools. 有诸如apksigner之类的开发人员工具,它是其中一种工具。 Developpers have rights to select signing tools. 开发人员有权选择签名工具。 Unsigned apks are for them, I think. 我认为,未签名的APK适用于他们。

Just for knowledge: 只是为了知识:
Some guys seems to find a way to temporally disable such security features like this . 有些人似乎找到一个方法来暂时禁用此类安全功能,如这个

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM