Android Studio DDMS
生活随笔
收集整理的這篇文章主要介紹了
Android Studio DDMS
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
DDMS(Dalvik Debug Monitor Service)
是 Android 開發環境中的Dalvik虛擬機調試監控服務。
AS 3.3 工具箱里面 DDMS,實際上3.X以后這個工具已被替代了,有Layout Inspector布局的調試,Android Profiler 測量應用性能
如果非常想用Android 經典的DDMS工具可以這樣查找:
到你安裝SDK的目錄,找到tools文件夾下的 monitor.bat 雙擊執行就可以了 ok:
在這里我們要借助這個工具談一下 jni殺不死的fork進程。
在c里面fork一個新的進程這個進程和JVM分開運行的。
app卸載后這個進程一直運行。用adb shell 命令 ps查看進程id(也可以在DDMS上面查看到進程號pid)
然后kill 掉pid 就殺死了。
3.am Activity Manager 活動管理器
am start: start an Activity. Options are:-D: enable debugging-W: wait for launch to complete--start-profiler <FILE>: start profiler and send results to <FILE>--sampling INTERVAL: use sample profiling with INTERVAL microsecondsbetween samples (use with --start-profiler)-P <FILE>: like above, but profiling stops when app goes idle-R: repeat the activity launch <COUNT> times. Prior to each repeat,the top activity will be finished.-S: force stop the target app before starting the activity--opengl-trace: enable tracing of OpenGL functions--user <USER_ID> | current: Specify which user to run as; if notspecified then run as the current user.-a 開啟一個Activity指令解釋:
am start -a android.intent.action.VIEW -d http://www.baidu.com am: Activity Mainager start : 開啟 -a : 開啟一個 Activity android.intent.action.VIEW: Android的Action -d : data 后面的就是要開啟的百度頁面總結
以上是生活随笔為你收集整理的Android Studio DDMS的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: QQ和360大战的这场戏我的看法
- 下一篇: c语言编写计算ackerman函数的递归