Android Studio DDMS
生活随笔
收集整理的這篇文章主要介紹了
Android Studio DDMS
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
DDMS(Dalvik Debug Monitor Service)
是 Android 開發(fā)環(huán)境中的Dalvik虛擬機(jī)調(diào)試監(jiān)控服務(wù)。
AS 3.3 工具箱里面 DDMS,實(shí)際上3.X以后這個工具已被替代了,有Layout Inspector布局的調(diào)試,Android Profiler 測量應(yīng)用性能
如果非常想用Android 經(jīng)典的DDMS工具可以這樣查找:
到你安裝SDK的目錄,找到tools文件夾下的 monitor.bat 雙擊執(zhí)行就可以了 ok:
在這里我們要借助這個工具談一下 jni殺不死的fork進(jìn)程。
在c里面fork一個新的進(jìn)程這個進(jìn)程和JVM分開運(yùn)行的。
app卸載后這個進(jìn)程一直運(yùn)行。用adb shell 命令 ps查看進(jìn)程id(也可以在DDMS上面查看到進(jìn)程號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 后面的就是要開啟的百度頁面總結(jié)
以上是生活随笔為你收集整理的Android Studio DDMS的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: QQ和360大战的这场戏我的看法
- 下一篇: android sina oauth2.