[英]Possible to send “release” build, over USB cable, from Android Studio?
Using Android Studio 0.6.1 (actually on OSX), normally I have build variant set on "debug".使用 Android Studio 0.6.1(实际上在 OSX 上),通常我在“调试”上设置了构建变体。
I have a phone plugged in "Connected as a media device".我有一部电话插入“作为媒体设备连接”。 I click the "Run" button up top.我单击顶部的“运行”按钮。
Everything works fantastically well.一切都非常好。
However.然而。 Say I change this to "release" ...假设我将其更改为“发布”...
it seems impossible, to now send it over the USB to the phone?似乎不可能,现在通过 USB 将其发送到手机?
I understand that to publish to the playstore, I use "release" and use "build signed apk", using the password for the keystone.我知道要发布到 Playstore,我使用“发布”并使用“构建签名的 apk”,使用 keystone 的密码。 That works perfectly.这完美地工作。
SoBut can I just "leave it on" "release" mode while working with the tethered phones? SoBut 我可以在使用系留电话时“保持开启”“释放”模式吗?
(With iOS development for example, the "debug" setting is just annoying and sucks, and you can just leave it on "release" all the time, basically. Indeed you can just delete the "debug" variant.) (以 iOS 开发为例,“调试”设置很烦人而且很糟糕,基本上你可以一直把它放在“发布”上。实际上你可以删除“调试”变体。)
thanks, Android aces!!谢谢,安卓王牌!!
Here's the error that appears if you try to send a "release" build over the USB cable to a tethered phone.如果您尝试通过 USB 电缆将“发布”版本发送到系留电话,则会出现以下错误。
The Android system requires that all installed applications be digitally signed with a certificate whose private key is held by the application's developer. Android 系统要求所有已安装的应用程序都使用证书进行 数字签名,该证书的私钥由应用程序开发人员持有。
Have you set up a key-store for signing the release build?您是否设置了用于签署发布版本的密钥库?
for details using gradle see how-to-create-a-release-signed-apk-file-using-gradle有关使用 gradle 的详细信息,请参阅how-to-create-a-release-signed-apk-file-using-gradle
With android studio 0.5.9 you can use Module settings [F4]/app signing
to define the key store.使用 android studio 0.5.9,您可以使用Module settings [F4]/app signing
来定义密钥库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.