安卓实用常用的开发工具

来源:互联网 发布:openwrt 网络重启命令 编辑:程序博客网 时间:2024/06/06 01:08

作者:韩梦飞沙

Author:han_meng_fei_sha

 

邮箱:313134555@qq.com

E-mail: 313134555 @qq.com

 

DDMS

它可以查看程序使用时所运行的线程信息,网络使用率,可以进行 分析profiling 来查看期间那个方法使用了最多的资源。

dmtracedump

把 分析profiling 生成的 跟踪trace 文件处理成一个图片文件,显示方法之间的调用关系。

 

traceview

用来打开 分析profiling 生成的 跟踪trace文件 的。traceview 会列出每个方法调用所使用的事件,展开方法还能看到方法被调用其他方法所占用的时间百分比。

这样就可以知道那个方法用了最多的资源,进而可以对其进行优化或者将其搬离主线程。

 

 uiautomatorviewer

 它可以展示出当面屏幕所呈现的视图(View)的布局(Layout)以及其尺寸大小。这样就可以用来调整xml文件来重新安排布局。用它找到视图的id,然后通过id反向寻找对应的的xml文件。

这个工具不局限在只能查看自己的应用,它可以显示屏幕上的任何东西。所以可以用它来看看别人的应用使用了什么View来呈现也是不错的,比如看看他们是用ListView还是RelativeLayout,用的时button还是textview加点击事件。

它不支持查看自定义的视图,只会显示系统定义的类型名字。另外如果是利用canvas和OpenGL画的内容,也无法查看到其具体细节。

monitor

 

android

这个工具会叫android也说明了它地位应该是最高的,的确它的功能包括了管理SDK(Software development kit)和AVD(Android Virtual Device),以及创建和更新开发使用的 项目Project。通过android -h就能看到其基本使用方式。

       Usage:       android [global options] action [action options]       Global options:  -h --help       : Help on a specific command.  -v --verbose    : Verbose mode, shows errors, warnings and all messages.     --clear-cache: Clear the SDK Manager repository manifest cache.  -s --silent     : Silent mode, shows errors only.                                                                    Valid                                                                    actions                                                                    are                                                                    composed                                                                    of a verb                                                                    and an                                                                    optional                                                                    direct                                                                    object:-    sdk              : Displays the SDK Manager window.-    avd              : Displays the AVD Manager window.-   list              : Lists existing targets or virtual devices.-   list avd          : Lists existing Android Virtual Devices.-   list target       : Lists existing targets.-   list device       : Lists existing devices.-   list sdk          : Lists remote SDK repository.- create avd          : Creates a new Android Virtual Device.-   move avd          : Moves or renames an Android Virtual Device.- delete avd          : Deletes an Android Virtual Device.- update avd          : Updates an Android Virtual Device to match the folders                        of a new SDK.- create project      : Creates a new Android project.- update project      : Updates an Android project (must already have an                        AndroidManifest.xml).- create test-project : Creates a new Android project for a test package.- update test-project : Updates the Android project for a test package (must                        already have an AndroidManifest.xml).- create lib-project  : Creates a new Android library project.- update lib-project  : Updates an Android library project (must already have                        an AndroidManifest.xml).- create uitest-project: Creates a new UI test project.- update adb          : Updates adb to support the USB devices declared in the                        SDK add-ons.- update sdk          : Updates the SDK by suggesting new platforms to install                        if available.

android sdk

android sdk指令就可以开打一个可视化的管理窗口,让用户可以在上边选择下载需要的Android版本以便可以使用其上的API。还可以下载相应API的源码方便学习。
(可以不加sdk参数,直接使用android指令也是打开SDK管理窗口。)

android avd

android avd指令可以打开虚拟设备管理器,方便创建和修改Android虚拟设备以供开发测试

开发Android必知的工具 - Ider - 博客园

原创粉丝点击