Android Studio 签名的 APK 未安装 [英] Android Studio Signed APK Not Installing

查看:48
本文介绍了Android Studio 签名的 APK 未安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Android Studio 中并在 Build > Generate Signed APK 下签署 APK 并使用向导.一切似乎都正常,并生成了一个 .apk 文件.

I am in Android Studio and signing an APK under Build > Generate Signed APK and using the wizard. Everything appears to sign fine and an .apk file is generated.

当我将此文件复制到我的设备(Nexus 7 或 Moto X)时,它不会安装.我收到安装失败"消息.

When I go copy this file over to my device (either Nexus 7 or Moto X) it won't install. I get an "install failed" message.

我完全不知道出了什么问题.我已将此 .apk 放在 google play 开发者控制台中的alpha 测试"下,它被很好地接受(我正在等待测试者链接变为活动状态以尝试从那里下载/安装).

I can't figure out what's going wrong at all. I have put this .apk up in the google play developer console under "alpha testing" and it was accepted fine (I'm waiting for the tester link to become active to try and download / install from there).

这里的向导说明(http://developer.android.com/tools/publishing/app-signing.html#studio) 在最后阶段的屏幕截图中显示了一个名为构建类型"的下拉列表,该下拉列表被选择为发布".我的 Android Studio 版本中没有.在这个向导中我找不到任何可以让我指定发布"版本的内容.

The instructions for the wizard here (http://developer.android.com/tools/publishing/app-signing.html#studio) show in the screenshot of the final stage a drop down called "Build Type" selected to "release". I don't have that in my version of Android Studio. There isn't anything I can find in this wizard that will let me specify a "release" build.

任何人都可以给我的任何帮助将不胜感激.谢谢!

Any help anyone can give me would be so much appreciated. Thanks!

推荐答案

您需要处于发布模式才能生成已签名的 APK.在您的 Android Studio 的左下角应该是一个小方形图标.单击它,将弹出一个菜单.现在选择 Build Variant,您将获得一个包含两列的表格:Module 和 Build Variant.Build Variant 下一定有 debug 写的.点击它,你会得到一个下拉菜单.现在点击发布,Gradle 将开始构建发布版本.完成后生成已签名的 APK.

You need to be in release mode to generate a signed APK. On the lower left corner of your Android Studio should be a tiny square icon. Click on it and a menu shall pop up. Now choose Build Variants and you'll get a table with two columns: Module and Build Variant. There must be debug written below Build Variant. Click on it and you will get a dropdown. Now click on release and Gradle will start building the release version. Once it is completed generate the signed APK.

这篇关于Android Studio 签名的 APK 未安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆