运行 ADT 项目时自动签署 APK [英] Automatic APK signing when running ADT projects
问题描述
我习惯于在手机上开发和调试 Android 应用程序,速度相当快.当我没事时,我导出一个签名的 APK 上传到市场.
I'm used to develop and debug android apps on my phone, it's pretty faster. When I'm ok, I export a signed APK to upload to the market.
现在我使用 Google Maps API,我必须向 Manifest 添加一个签名,这个签名与我用来签署 APK 以供发布的密钥相关联.因此,我可以导出已签名的 APK 以在我的手机上进行测试,但它不是自动化的,而且我无法再查看 LogCat.
Now I use Google Maps APIs, I must add a signature to the Manifest, this signature is associated with my key I use to sign APKs for release. So I am able to export a signed APK to test on my phone, but it's not automated and I cannot view LogCat anymore.
在将 APK 上传到我连接的手机之前,我可以指示 ADT+Eclipse 对其进行自动签名吗?
Can I just instruct ADT+Eclipse to auto-sign the APK before uploading it to my attached phone?
我是不是漏掉了一点?
推荐答案
我认为你不能直接通过 ADT 来做到这一点.但是你可以使用 ant 来构建它支持签名 (http://developer.android.com/tools/building/building-cmdline.html).
I don't think you can do this via ADT directly. But you could use ant to build instead which supports signing (http://developer.android.com/tools/building/building-cmdline.html).
只需在 ant.properties 文件中设置 key.store、key.alias 和 key.store.password、key.alias.password 属性即可.
Just set the key.store, key.alias, and key.store.password, key.alias.password properties in the ant.properties file.
您还可以从 eclipse 中触发 ant 构建并添加新的 ant 目标以在您的设备上安装/启动应用程序
You can also trigger ant builds from within eclipse and add a new ant target to install/launch the app on your device
这篇关于运行 ADT 项目时自动签署 APK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!