本文是Android开源项目那些不错的第四篇——开发工具,**主要介绍Android开发工具和测试工具相关的开源项目**。Android开源项目系列总结已经完成,包括:Android开源项目***:个性化控件(View)Android开源项目第二篇:工具库Android开源项目第三篇:优秀项目Android开源项目第四章:开发和测试工具Android开源项目第五章:优秀个人和团队1.Buckfacebook开源的Android编译工具,效率是ant的两倍。主要优点是:(1)通过并行使用多核cpu和跟踪常量资源,加快编译速度,减少增量编译时间(2)编译规则可以在编译系统中生成,不需要另外的系统生成编译规则文件(3)可以边编译边生成单元测试结果(4)IDE编译和持续集成编译均可使用(5)Facebook的持续优化项目地址:https://github.com/facebook/buck2,AndroidMavenPluginAndroidMaven插件,可用用于管理android的三方依赖。在J2EE开发中,maven是一个非常成熟的依赖库管理工具,可以统一管理依赖库。项目地址:https://github.com/jayway/maven-android-plugin3。Spoon可用于不同类型安卓设备的自动化测试。可以在不同的机器上运行应用apk和测试apk,并生成相应的测试报告。项目地址:https://github.com/square/spoon4,AndroidFEST提供了一系列方便的断言,可以用来提高编写Android自检代码的效率项目地址:https://github.com/square/fest-android5,SelectorChapekforAndroidAndroidStudio插件可以根据固定文件名格式资源自动生成drawableselectorsxml文件。项目地址:https://github.com/inmite/android-selector-chapek6,AndroidResourceNavigatorchrome插件,可以方便的查看github上android源码项目的styles.xml和themes.xml。主要功能:(1)快速打开androidstyles.xmlthemes.xml(2)方便资源间跳转。styles.xmlthemes.xml文件中的资源链接跳转,可以轻松跳转到某个资源(3)方便查找某个样式和主题。在chrome地址栏输入arn+tab+searchcontent回车(4)自动下载不同分辨率的drawables(5)通过映射找到那些没有按照固定命名规则命名的样式和主题项目地址:https:///github。com/jgilfelt/android-resource-navigator示例:https://chrome.google.com/webstore/detail/android-resource-navigato/agoomkionjjbejegcejiefodgbckeebo?hl=en&gl=GB7,AndroidActionBarStyleGeneratorAndroidActionBarstylegenerator,可用选择ActionBar样式在线自动生成需要的图片资源和xml文件项目地址:https://github.com/jgilfelt/android-actionbarstylegenerator在线演示:http://jgilfelt.github.io/android-actionbarstylegenerator/8、ViewServer允许该应用程序在任何手机上运行。可以使用HierarchyViewer查看项目地址:https://github.com/romainguy/ViewServer9。GridWichterleforAndroid在整个系统上显示一个网格,帮助查看应用布局,让布局更加美观。可以设置网格大小和颜色,android推荐48dp和8dp,参见AndroidDesignGuidelines–MetricsandGrids项目地址:https://github.com/inmite/android-grid-wichterleAPK地址:https://play.google。com/store/apps/details?id=eu.inmite.android.gridwichterlePS:离hierarchyviewer还差得很远,不过偶尔可以作为布局查看工具使用。10.渠道打包工具,让app可以在任何手机上运行。可以使用HierarchyViewer查看项目地址:https://github.com/umeng/umeng-muti-channel-build-tool另见Google的构建系统Gradle:http://tools.android.com/tech-docs/new-build-system/user-guide11,Catlog移动端日志查看工具,支持不同颜色显示,关键字过滤,级别过滤,进程id过滤,记录功能等项目地址:https://github.com/nolanlawson/Catlog在线演示:https://play.google.com/store/apps/details?id=com.nolanlawson.logcat12,PIDCat查看logcat日志项地址根据包:https://github.com/JakeWharton/pidcat13,Hugo是一个打印函数信息和执行时间的工具,只在debug模式下有效项目地址:https://github.com/JakeWharton/hugo
