使用 android maven 插件调试应用程序启动
我正在使用最新版本的 android maven 插件。我使用 android:deploy 和 android:run 在我的设备上启动我的应用程序。当我想要调试时,我进入 Eclipse 中的 DDMS 并检查我的应用程序的绿色错误图标。一切工作正常...但我只能调试正在运行的应用程序,即它已经启动。如果我在应用程序构造函数或 onCreate 中放置断点,它不会停止(显然是因为应用程序已启动并且调试尚未激活......)。
所以我的问题是:如何直接从 Maven 以调试模式启动我的应用程序,就像我为从 Eclipse 启动的应用程序所做的那样?
提前谢谢
I'm working with the latest version of android maven plugin. I use android:deploy and android:run to launch my app on my device. When I want to debug, I go into DDMS in eclipse and check the green bug icon for my app. Everything works fine... but I can only debug a running app, ie it has already started. If I put a breakpoint in my application constructor or onCreate, it wont stop (obviously because the application has started and the debugging didn't been activated... yet).
So my question is: how can I start my app in debug mode directly from maven like I would do for an app that I start from eclipse ?
thanks ahead
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
感谢 Lukasz,我在 Idea 中找到了启动来触发调试模式的命令。
基本上,应用程序是使用 android:deploy 部署的,但我不是使用 android:run,而是使用 -D 启动 shell“am”命令。这是任何有兴趣的人的用法。
Thanks to Lukasz, I found the command in Idea that is launched to trigger the debug mode.
Basically, the application is deployed with android:deploy but instead of android:run, I launch a shell "am" command with -D. Here's the usage for anyone interested.
您可以通过 eclipse 而不是通过 maven 在调试中启动应用程序,而不是 android:deploy 和 android:run 。您必须正确配置您的项目才能执行此操作。
Instead of android:deploy and android:run you could just launch your application in debug by eclipse and not by maven. You have to have your project configured properly to do this.
您可以使用这篇文章部署并启动它。为了调试我想并希望你只需要更改一些参数。
You can deploy and start it using this post. To debug I guess and hope you only need to change some parameters.