如何调试签署发布的apk? [英] How to debug apk signed for release?

查看:18
本文介绍了如何调试签署发布的apk?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个已签名并上传到 Android Market 并安装在手机上的 apk.我想在我的手机上运行这个版本的 apk(通过 Eclipse)来调试它.我以前做过这个(记得它是使用其中一个 Android 开发工具;也许是 Dalvik 调试监视器),但不幸的是不记得如何去做,也无法在网上找到任何文章.有谁知道如何做到这一点?

I have an apk which I've signed and uploaded to Android Market, and installed on my phone. I would like to debug this release apk (by means of Eclipse) whilst it is running on my phone. I have done this before (and remember it being with one of the Android development tools; perhaps Dalvik Debug Monitor) but unfortunately cannot remember how to do it and have been unable to find any articles online. Does anyone know how this can be done?

注意:在清单中设置了 android:debuggable="true" 并在我的手机上启用了 USB 调试.

Note: I have set android:debuggable="true" in the manifest and have enabled USB Debugging on my phone.

推荐答案

确保 android:debuggable="true" 在清单的 application 标记中设置文件,然后:

Be sure that android:debuggable="true" is set in the application tag of your manifest file, and then:

  1. 将手机插入电脑并在手机上启用 USB 调试
  2. 打开 eclipse 和一个包含应用代码的工作区
  3. 在 Eclipse 中,转到 Window->Show View->Devices
  4. 查看现在应该可见的设备视图,您应该会看到列出的设备
  5. 如果您的设备未列出,您必须先找到手机的 ADB 驱动程序,然后再继续
  6. 如果您想单步执行代码,请在应用中的某处设置断点
  7. 在手机上打开应用
  8. 在设备"视图中,展开您手机的条目(如果尚未展开),然后查找您的应用程序包名称.
  9. 单击包名称,在设备视图的右上角,您应该会看到一个绿色错误以及许多其他小按钮.点击绿色错误.
  10. 您现在应该已附加/调试您的应用.

这篇关于如何调试签署发布的apk?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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