最全最好用的Android Studio插件整理

MarACT 7年前
   <p>现在Android的开发者基本上都使用Android Studio进行开发(如果你还在使用eclipse那也行,毕竟你乐意怎么样都行)。使用好Android Studio插件能大量的减少我们的工作量。</p>    <p><strong>1.GsonFormat</strong></p>    <p>快速将json字符串转换成一个Java Bean,免去我们根据json字符串手写对应Java Bean的过程。</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/0c3a9c957f47b0aa3f99000bf49acbae.gif"></p>    <p>使用方法:快捷键Alt+S也可以使用Alt+Insert选择GsonFormat</p>    <p><strong>2.Android ButterKnife Zelezny</strong></p>    <p>配合ButterKnife实现注解,从此不用写findViewById,想着就爽啊。在Activity,Fragment,Adapter中选中布局xml的资源id自动生成butterknife注解。</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/a99d278bcd691470053a288cf9c76c0b.gif"></p>    <p>使用方法:Ctrl+Shift+B选择图上所示选项</p>    <p><strong>3.Android Code Generator</strong></p>    <p>根据布局文件快速生成对应的Activity,Fragment,Adapter,Menu。</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/633132497edc0e05c9b3e95c12836548.gif"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/5da3f9e4c59e52b3a41b81eb3c9d6f99.gif"></p>    <p><strong>4.Android Parcelable code generator</strong></p>    <p>JavaBean序列化,快速实现Parcelable接口。</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/ea568a02c6fd411d9dcabda9a551505b.jpg"></p>    <p><strong>5.Android Methods Count</strong></p>    <p>显示依赖库中得方法数</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/f9b8685e07d9529cd19710c6fa16a4bf.gif"></p>    <p><strong>6.Lifecycle Sorter</strong></p>    <p>可以根据Activity或者fragment的生命周期对其生命周期方法位置进行先后排序,快捷键Ctrl + alt + K</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/349c4c8f51e2c2d1dee83e1ed07d7e7c.jpg"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/f89f16be8b543967f1ab1ca104b6104c.jpg"></p>    <p><strong>7.CodeGlance</strong></p>    <p>在右边可以预览代码,实现快速定位</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/96fce220a3736b0b209aa4dfff5d327d.jpg"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/2bfd25af3689dec08a4a6ecc38819678.jpg"></p>    <p><strong>8.findBugs-IDEA</strong></p>    <p>查找bug的插件,Android Studio也提供了代码审查的功能(Analyze-Inspect Code…)</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/b8b806d2d674bb42f0cb27055ca3c90b.jpg"></p>    <p><strong>9.ADB WIFI</strong></p>    <p>使用wifi无线调试你的app,无需root权限</p>    <p>也可参考以下文章:</p>    <p>Android wifi无线调试App新玩法ADB WIFI</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/66fa67821722f9d6f8f7f73151bafc0a.jpg"></p>    <p><strong>10.AndroidPixelDimenGenerator</strong></p>    <p>Android Studio自动生成dimen.xml文件插件</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/ac04cc5807280057fa2cfd1455519d10.jpg"></p>    <p><strong>11.JsonOnlineViewer</strong></p>    <p>在Android Studio中请求、调试接口</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/0915d0691f1df3edae55084e530f3885.jpg"></p>    <p><strong>12.Android Styler</strong></p>    <p>根据xml自动生成style代码的插件</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/95e6af8b433421a2c082f618a1ace2ef.jpg"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/75887d321a5fb92df3c4b5223778f7d7.jpg"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/c8b968f0db623e6c2202c3ad3b3799b6.jpg"></p>    <p>Usage:</p>    <p>a. copy lines with future style from your layout.xml file</p>    <p>b. paste it to styles.xml file with Ctrl+Shift+D (or context menu)</p>    <p>c. enter name of new style in the modal window</p>    <p>d. your style is prepared!</p>    <p><strong>13.Android Drawable Importer</strong></p>    <p>这是一个非常强大的图片导入插件。它导入Android图标与Material图标的Drawable ,批量导入Drawable ,多源导入Drawable(即导入某张图片各种dpi对应的图片)</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/3669cdd80558e03e019f1eaf9b774354.jpg"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/d7aaf27dcb13eb2ec97e8511cfa2ade3.jpg"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/7e412771d06a7bf646d4b18fc9bb66ae.jpg"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/9c7b4a9c095b30cd83f95207a22351d6.jpg"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/2277dacdbf3c983c6e6f56d69658ca38.png"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/ed21002b6c365469eb6d52082af78d88.jpg"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/ffa38586457ef69061db7e09d15de1ac.jpg"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/ac776a1c64cfff2cb8ba64b207313da3.png"></p>    <p><strong>14.SelectorChapek for Android</strong></p>    <p>通过资源文件命名自动生成Selector文件。</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/719ba80a074f8984930b6bf45b7ce563.jpg"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/e8494d94d5662de973c98ca48ed224fe.jpg"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/5515068b12240dd40858c6652631b3e5.png"></p>    <p><strong>15.GenerateSerialVersionUID</strong></p>    <p>实现Serializable序列化bean</p>    <p>Adds a new action ‘SerialVersionUID’ in the generate menu (alt + ins). The action adds an serialVersionUID field in the current class or updates it if it already exists, and assigns it the same value the standard ‘serialver’ JDK tool would return. The action is only visible when IDEA is not rebuilding its indexes, the class is serializable and either no serialVersionUID field exists or its value is different from the one the ‘serialver’ tool would return.</p>    <p><strong>16.genymotion</strong></p>    <p>速度较快的android模拟器</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/99095b9fcc746ebbb5307a175d1067c1.png"></p>    <p><strong>17.LeakCanary</strong></p>    <p>帮助你在开发阶段方便的检测出内存泄露的问题,使用起来更简单方便。</p>    <p>可以参考以下文章:</p>    <p>LeakCanary 中文使用说明</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/74de57b050dca0abe3de309afeb08332.jpg"></p>    <p><strong>18.Android Postfix Completion</strong></p>    <p>可根据后缀快速完成代码,这个属于拓展吧,系统已经有这些功能,如sout、notnull等,这个插件在原有的基础上增添了一些新的功能,我更想做的是通过原作者的代码自己定制功能,那就更爽了</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/5890f960e1c8e508217b49fb1ae48b90.gif"></p>    <p><strong>19.Android Holo Colors Generator</strong></p>    <p>通过自定义Holo主题颜色生成对应的Drawable和布局文件</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/58f2bd4a6d9a3ea009d2a6121ede1535.jpg"></p>    <p><strong>20.dagger-intellij-plugin</strong></p>    <p>dagger可视化辅助工具</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/fa12956cec57aef842fb6eb6631a936a.gif"></p>    <p><strong>21.GradleDependenciesHelperPlugin</strong></p>    <p>maven gradle 依赖支持自动补全</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/9ac3eadf1d61b29f502cbf64ec4559f7.jpg"></p>    <p><strong>22.RemoveButterKnife</strong></p>    <p>ButterKnife这个第三方库每次更新之后,绑定view的注解都会改变,从bind,到inject,再到bindview,搞得很多人都不敢升级,一旦升级,就会有巨量的代码需要手动修改,非常痛苦</p>    <p>当我们有一些非常棒的代码需要拿到其他项目使用,但是我们发现,那个项目对第三方库的使用是有限制的,我们不能使用butterknife,这时候,我们又得从注解改回findviewbyid</p>    <p>针对上面的两种情况,如果view比较少还好说,如果有几十个view,那么我们一个个的手动删除注解,写findviewbyid语句,简直是一场噩梦(别问我为什么知道这是噩梦)</p>    <p>所以,这种有规律又重复简单的工作为什么不能用一个插件来实现呢?于是RemoveButterKnife的想法就出现了。</p>    <p>具体介绍</p>    <p><strong>23.AndroidProguardPlugin</strong></p>    <p>一键生成项目混淆代码插件,值得你安装~(不过目前可能有些第三方项目的混淆还未添加完全)</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/fa12956cec57aef842fb6eb6631a936a.gif"></p>    <p><strong>24.otto-intellij-plugin</strong></p>    <p>otto事件导航工具。</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/b54c17f6e2f83d1e328c9c7cac9d4f5b.gif"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/cf31c866bcc2cb9d0362bec131a4329f.gif"></p>    <p><strong>25.eventbus-intellij-plugin</strong></p>    <p>eventbus导航插件</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/a7ea817ce5249ef8e7e4b70195e84f07.gif"></p>    <p><strong>26.idea-markdown</strong></p>    <p>markdown插件</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/9f1ebf88e1a332ac1b0173f1fa3a313f.jpg"></p>    <p><strong>27.Sexy Editor</strong></p>    <p>设置AS代码编辑区的背景图</p>    <p>首先点击界面的设置按钮 进入设置界面,选中Plugins,右边选择 Browser … ,输入Sexy … 下面自动弹出候选插件,右边点击Install 安装</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/cbf2d9f0d2353bec5a1640a3ed368568.jpg"></p>    <p>安装成功 后需要重启AS</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/5637ca49619ae88cdfb3d67de4595a39.jpg"></p>    <p>重启完成之后 进入设置界面 选择other Setting 下的Sexy Editor , 右侧 insert 一张或多张图片即可,上面的其他设置可以设置方位 间隔时间 透明度等等,设置完成后,要关闭打开的文件,重新打开项目文件即可在代码编辑区显示插入的图片,作为代码编辑区的背景图。</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/20d67429af6e085b045218071f2bf662.jpg"></p>    <p><strong>28.folding-plugin</strong></p>    <p>布局文件分组的插件</p>    <p><strong>29.Android-DPI-Calculator</strong></p>    <p>DPI计算插件</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/cdf7464ce7048e938aa0aa362e97a204.png"></p>    <p>使用:</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/f185263c2adff38e8912c6fa7c999676.png"></p>    <p>或者</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/fe55531856f14297846da53edd2b36da.png"></p>    <p><strong>30.gradle-retrolambda</strong></p>    <p>在java 6 7中使用 lambda表达式插件</p>    <p>修改编译的jdk为java8:</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/102037ba76df111d5aab62b481781ef5.jpg"></p>    <p><strong>31.Android Studio Prettify</strong></p>    <p>可以将代码中的字符串写在string.xml文件中</p>    <p>选中字符串鼠标右键选择图中所示</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/f8bf842dc1c3521f5c07ce0f8b484289.png"></p>    <p>这个插件还可以自动书写findViewById</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/588e68ec55cd8e053f5643e5aaeeb740.gif"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/bce2e0c6abc914c509b01bed1c47c7aa.png"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/d3632c6219968f31896242c77bf1c93e.png"></p>    <p><strong>32.Material Theme UI</strong></p>    <p>添加Material主题到你的AS</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/de9f6d4a1b03d56a673ea553e9c37e11.jpg"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/f6241bc4d7c21de4a845aabd024dd9c6.jpg"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/4597c321398e20259bea4809fd5c2657.jpg"></p>    <p><strong>33..ignor</strong>e</p>    <p>我 们都知道在Git 中想要过滤掉一些不想提交的文件,可以把相应的文件添加到.gitignore 中,而.gitignore 这个Android Studio 插件根据不同的语言来选择模板,就不用自己在费事添加一些文件了,而且还有自动补全功能,过滤文件再也不要复制文件名了。我们做项目的时候,并不是所有文 件都是要提交的,比如构建的build 文件夹,本地配置文件,每个Module 生成的iml 文件,但是我们每次add,commit 都会不小心把它们添加上去,而gitignore 就是解决这种痛点的,如果你不想提交的文件,就可以在创建项目的时候将这个文件中添加即可,将一些通用的东西屏蔽掉。</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/457f3da7c1fa56dc4066d9226d776597.gif"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/89d5b4f0736ccd2208f028e909bc2ada.gif"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/413bdd0b56481717531fd3019d1fa43b.gif"></p>    <p><strong>34.CheckStyle-IDEA</strong></p>    <p>CheckStyle-IDEA 是一个检查代码风格的插件,比如像命名约定,Javadoc,类设计等方面进行代码规范和风格的检查,你们可以遵从像Google Oracle 的Java 代码指南 ,当然也可以按照自己的规则来设置配置文件,从而有效约束你自己更好地遵循代码编写规范。</p>    <p><strong>35.Markdown Navigator</strong></p>    <p>github:Markdown Navigator</p>    <p>Markdown插件</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/99c5303ad61770da34cd210988f05a7b.gif"></p>    <p><strong>36.ECTranslation</strong></p>    <p>Android Studio Plugin,Translate English to Chinese. Android Studio 翻译插件,可以将英文翻译为中文。</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/eb8313525439fadaacfc64d8bab56fbb.jpg"></p>    <p><strong>37.PermissionsDispatcher plugin</strong></p>    <p>github:PermissionsDispatcher plugin</p>    <p>自动生成6.0权限的代码</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/892a4daab92d9ff591f176bea3eb82b5.gif"></p>    <p><strong>38.WakaTime</strong></p>    <p>github:WakaTime</p>    <p>记录你在IDE上的工作时间</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/5d0adf332b25fa3aa1fb24fff652e820.png"></p>    <p><strong>39.AndroidWiFiADB</strong></p>    <p>无线调试应用</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/d260274f44ade04b7d9ae3c1199ec48e.gif"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/4898d8f07d61ebd29db1365d16e3195e.jpg"></p>    <p><strong>40.AndroidLocalizationer</strong></p>    <p>可用于将项目中的 string 资源自动翻译为其他语言的 Android Studio/IntelliJ IDEA 插件</p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/8e3a4cbb7133a6502932722f16bb37b8.jpg"></p>    <p style="text-align:center"><img src="https://simg.open-open.com/show/d8b89f4b94cf3c87dfad477ec3a8ce96.jpg"></p>    <p>关于Java和Android大牛频道</p>    <p>Java和Android大牛频道是一个数万人关注的探讨Java和Android开发的公众号,分享和原创最有价值的干货文章,让你成为这方面的大牛!</p>    <p>我们探讨android和Java开发最前沿的技术: <strong>android性能优化 ,插件化,动态化,跨平台,动态化,加固和反破解等,也讨论设计模式/软件架构</strong> 等。由一 <strong>群来自BAT的工程师组成的团队</strong> 。我们的愿景是服务每一个APP开发者。</p>    <p> </p>    <p> </p>    <p>来自:http://www.jianshu.com/p/327027fec8fc</p>    <p> </p>