美文网首页
AndroidStudio 插件看这个就够啦

AndroidStudio 插件看这个就够啦

作者: 蘭小木 | 来源:发表于2017-01-18 21:30 被阅读0次

    1.GsonFormat

    快速将json字符串转换成一个Java Bean,免去我们根据json字符串手写对应Java Bean的过程。

    使用方法:快捷键Alt+S也可以使用Alt+Insert选择GsonFormat

    2.Android ButterKnife Zelezny

    github地址:https://github.com/JakeWharton/butterknife   更新比较快,使用前建议先看看GitHub 更新的多少版本啦

    配合ButterKnife实现注解,从此不用写findViewById,想着就爽啊。在Activity,Fragment,Adapter中选中布局xml的资源id自动生成butterknife注解。

    使用方法:Ctrl+Shift+B选择图上所示选项

    3.findBugs-IDEA

    教程:http://blog.csdn.net/fancy_xty/article/details/51718687

    查找bug的插件,Android Studio也提供了代码审查的功能(Analyze-Inspect Code…)

    4.CodeGlance

    在右边可以预览代码,实现快速定位

    5.Android Code Generator

    根据布局文件快速生成对应的Activity,Fragment,Adapter,Menu。

    6.Android Toolbox Plugin

    通过xml布局文件生成ViewHolder或者ViewPresenter,生成ButterKnife注解。

    7.Android Parcelable code generator

    在类中插入实现了Parcelable接口的代码。

    7.1、TranslationPlugin  强大的翻译软件

    教程:http://yiiguxing.github.io/TranslationPlugin/start.html

    8.GenerateSerialVersionUID

    实现Serializable序列化bean

    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.

    9.Android Studio Prettify

    可以将代码中的字符串写在string.xml文件中

    选中字符串“测试Alt + Enter”键,同时按住Alt + Enter键,即可看到弹出选择的对话款,选择其中的“提取字符串资源”,如下图所示:

    10.ADB WIFI

    使用wifi无线调试你的app,无需root权限

    也可参考以下文章:http://blog.csdn.net/quan356270259/article/details/50876160

    11.Sexy Editor

    设置AS代码编辑区的背景图

    首先点击界面的设置按钮 进入设置界面,选中Plugins,右边选择 Browser … ,输入Sexy … 下面自动弹出候选插件,右边点击Install 安装

    进入设置界面 选择other Setting 下的Sexy Editor , 右侧 insert 一张或多张图片即可,上面的其他设置可以设置方位 间隔时间 透明度等等,设置完成后,要关闭打开的文件,重新打开项目文件即可在代码编辑区显示插入的图片,作为代码编辑区的背景图。

    12.eventbus-intellij-plugin

    eventbus导航插件

    13.Android Postfix Completion

    可根据后缀快速完成代码,这个属于拓展吧,系统已经有这些功能,如sout、notnull等,这个插件在原有的基础上增添了一些新的功能,我更想做的是通过原作者的代码自己定制功能,那就更爽了

    14、Android Material Design Icon Generator

    Android Material Design Icon Generator是一个可以生成Material Design图标的插件,效果图如下:

    Github项目地址https://github.com/konifar/android-material-design-icon-generator-plugin

    14.1、Codota

    搜索最好的Android代码。(Studio里面直接可以搜到此插件)

    14.2、adb idea

    Android Studio和Intellij IDEA的插件,可加速您的日常Android开发。  使用ADB操作APP。

    GitHub:https://github.com/pbreault/adb-idea

    14.3、RemoveButterKnife

    ButterKnife这个第三方库每次更新之后,绑定view的注解都会改变,从bind,到inject,再到bindview,搞得很多人都不敢升级,一旦升级,就会有巨量的代码需要手动修改,非常痛苦

    当我们有一些非常棒的代码需要拿到其他项目使用,但是我们发现,那个项目对第三方库的使用是有限制的,我们不能使用butterknife,这时候,我们又得从注解改回findviewbyid

    针对上面的两种情况,如果view比较少还好说,如果有几十个view,那么我们一个个的手动删除注解,写findviewbyid语句,简直是一场噩梦(别问我为什么知道这是噩梦)

    所以,这种有规律又重复简单的工作为什么不能用一个插件来实现呢?于是RemoveButterKnife的想法就出现了。

    具体介绍

    14.4、Android Drawable Importer

    这是一个非常强大的图片导入插件。它导入Android图标与Material图标的Drawable ,批量导入Drawable ,多源导入Drawable(即导入某张图片各种dpi对应的图片)

    15.SelectorChapek for Android

    通过资源文件命名自动生成Selector文件。

    16、JRebel for Android

    随着Android项目越来越大,编译时间也会逐步增加,项目里随便改几行代码,重新编译一下,少则几十秒,多则三四分钟,实在让人崩溃。JRebel的Run功能和Android Studio的Run功能不同,它不会每次Run都检查编译一下所有代码,相反它每次只会处理你修改过的代码,并且直接运行到你的机器上去。

    有人问了,那你这个不用重新编译打包,代码变更之后即时运行不就是 Instant Run 么?这个跟 Instant Run 有什么区别呢?

    确实跟 Instant Run 很像,但是用过 Instant Run 的同学应该深有感触,Instant Run 现在还不稳定,用的过程中会遇到莫名的 bug,而且我们用 Instant Run 本身的目的是想加快编译速度,提升我们的工作效率,但是有时候用了 Instant Run 反而让你的编译打包速度很慢,导致我自己后面其实都禁用了 Instant Run 的功能。

    而 JRebel 很稳定,目前已经发布了 2.0 版本,而且速度比 Instant Run 要快不少,官方说明是比 Instant Run 要快至少 8 倍以上。

    教程:http://blog.csdn.net/czhpxl007/article/details/52171551

    破解版:http://blog.lanyus.com/archives/179.html    建议大家还是买正版的,搞了半天破解都没成功。

    17、MVPHelper

    一款Intellj IDEA 和Android Studio的插件,可以为MVP生成接口以及实现类,解放双手。

    地址:https://github.com/githubwing/MVPHelper/blob/master/READMECN.MD

    选中字符串“测试Alt + Enter”键,同时按住Alt + Enter键,即可看到弹出选择的对话款,选择其中的“提取字符串资源”,如下图所示:

    18、LeakCanary

    检查 Android 内存泄漏

    GitHub :https://github.com/square/leakcanary

    教程1:http://www.jianshu.com/p/0049e9b344b0

    教程2:https://www.liaohuqiu.net/cn/posts/leak-canary-read-me/

    相关文章

      网友评论

          本文标题:AndroidStudio 插件看这个就够啦

          本文链接:https://www.haomeiwen.com/subject/rhjbbttx.html