android studio:发布apk未签名 [英] android studio: release apk is not signed
问题描述
*自从最初发布以来,我已将该帖子改为*
当我尝试运行刚刚构建的发行版apk时,出现错误您当前选择的变体的apk ...未签名."在编辑配置"弹出窗口中.这是我的步骤:
When I try to run a just-built release apk, I get an error "the apk for your currently selected variant ... is not signed." This is in the Edit Configuration popup. Here are my steps:
- 在构建变体"标签中,选择发布"
- 在菜单中,选择构建"->生成签名的APK"
- 在弹出窗口中,填写密钥存储区和密码的字段.
- 在第二个面板中,将目标文件夹更改为... \ app \ build \ outputs \ apk(请参阅下面的注释*)
- 观察工作室右上角的通知:APK已成功生成.
- 在菜单中,单击运行->运行应用程序.
- 我收到一个编辑配置"弹出窗口,错误为您当前选择的变体的apk ...未签名.
那么,为什么会出现此错误?生成的APK似乎有效.我已成功将其发布到Android应用商店(仅用于Alpha测试),并验证了堆栈转储被混淆了.
So, why this error? The APK generated appears to be valid. I have successfully posted it to the Android Store (alpha testing only) and verified that stack dumps are obfuscated.
我不能做的是将其下载(上面的第6步)到我的设备中.我想可以,因为我可以下载调试版本了.
What I can't do is download it (step 6 above) to my device. I guess that's ok since I can download the debug version just fine.
(*)Android Studio默认将发行版apk的输出输出到更高的目录(可能更方便).但是,我发现分散生成的文件时,很难管理它们的一致性,因此我更喜欢将所有生成的apk集中在一个地方.
(*) Android Studio defaults the output for the release apk to a higher, presumably more convenient directory. However I find it harder to manage the consistency of generated files when they are scattered about so I prefer all the generated apks in one place.
推荐答案
转到文件\项目结构"
完成! ;)
这篇关于android studio:发布apk未签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!