android studio 常用的插件



現在Android的開發者基本上都使用Android Studio進行開發(如果你還在使用eclipse那也行,畢竟你樂意怎麼樣都行)。使用好Android Studio插件能大量的減少我們的工作量。

1.GsonFormat

快速將json字符串轉換成一個Java Bean,免去我們根據json字符串手寫對應Java Bean的過程。

使用方法:快捷鍵Alt+S也可以使用Alt+Insert選擇GsonFormat

2.Android ButterKnife Zelezny

配合ButterKnife實現註解,從此不用寫findViewById,想着就爽啊。在Activity,Fragment,Adapter中選中佈局xml的資源id自動生成butterknife註解。

使用方法:Ctrl+Shift+B選擇圖上所示選項

3.Android Code Generator

根據佈局文件快速生成對應的Activity,Fragment,Adapter,Menu。


4.Android Parcelable code generator

JavaBean序列化,快速實現Parcelable接口。

5.Android Methods Count

顯示依賴庫中得方法數

6.Lifecycle Sorter

可以根據Activity或者fragment的生命週期對其生命週期方法位置進行先後排序,快捷鍵Ctrl + alt + K


7.CodeGlance

在右邊可以預覽代碼,實現快速定位


8.findBugs-IDEA

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

9.ADB WIFI

使用wifi無線調試你的app,無需root權限
也可參考以下文章:
Android wifi無線調試App新玩法ADB WIFI

10.AndroidPixelDimenGenerator

Android Studio自動生成dimen.xml文件插件

11.JsonOnlineViewer

在Android Studio中請求、調試接口

12.Android Styler

根據xml自動生成style代碼的插件



Usage:

a. copy lines with future style from your layout.xml file
b. paste it to styles.xml file with Ctrl+Shift+D (or context menu)
c. enter name of new style in the modal window
d. your style is prepared!

13.Android Drawable Importer

這是一個非常強大的圖片導入插件。它導入Android圖標與Material圖標的Drawable ,批量導入Drawable ,多源導入Drawable(即導入某張圖片各種dpi對應的圖片)








14.SelectorChapek for Android

通過資源文件命名自動生成Selector文件。



15.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.

16.genymotion

速度較快的android模擬器

17.LeakCanary

幫助你在開發階段方便的檢測出內存泄露的問題,使用起來更簡單方便。
可以參考以下文章:
LeakCanary 中文使用說明

18.Android Postfix Completion

可根據後綴快速完成代碼,這個屬於拓展吧,系統已經有這些功能,如sout、notnull等,這個插件在原有的基礎上增添了一些新的功能,我更想做的是通過原作者的代碼自己定製功能,那就更爽了

19.Android Holo Colors Generator

通過自定義Holo主題顏色生成對應的Drawable和佈局文件

20.dagger-intellij-plugin

dagger可視化輔助工具

21.GradleDependenciesHelperPlugin

maven gradle 依賴支持自動補全

22.RemoveButterKnife

ButterKnife這個第三方庫每次更新之後,綁定view的註解都會改變,從bind,到inject,再到bindview,搞得很多人都不敢升級,一旦升級,就會有巨量的代碼需要手動修改,非常痛苦
當我們有一些非常棒的代碼需要拿到其他項目使用,但是我們發現,那個項目對第三方庫的使用是有限制的,我們不能使用butterknife,這時候,我們又得從註解改回findviewbyid
針對上面的兩種情況,如果view比較少還好說,如果有幾十個view,那麼我們一個個的手動刪除註解,寫findviewbyid語句,簡直是一場噩夢(別問我爲什麼知道這是噩夢)
所以,這種有規律又重複簡單的工作爲什麼不能用一個插件來實現呢?於是RemoveButterKnife的想法就出現了。

具體介紹

23.AndroidProguardPlugin

一鍵生成項目混淆代碼插件,值得你安裝~(不過目前可能有些第三方項目的混淆還未添加完全)

24.otto-intellij-plugin

otto事件導航工具。